It's real because our laws (including those of European countries) make it real.
Some seem to assume there's some general "If it's American it's invalid" law in Europe. This is not the case. With the exception of specific laws, such as GDPR regarding privacy, this is a perfectly valid clause.
Copyright law can be a criminal matter in my country and then it will be handled by a Swedish court. You cannot just write a contract which makes you immune to criminal prosecution.
In Sweden you can set the jurisdiction for civil disputes in a contract.
Which is what everyone is talking about here.
For criminal, there is only jurisdiction in Sweden if the crime happened in Sweden. I would need you to link me a case where Sweden criminally convicted someone for copyright infringement who wasn't Swedish and wasn't in Sweden.
For example, I am not Swedish and do not travel there. Sweden has no power to enforce its laws against me. No matter what I do, I shouldn't be able to be convicted of criminal copyright infringent in Sweden.
The mechanisms limiting this are mostly about privacy. Not whether you can agree to adjudicate copyright or TOU in California