As a European, I don't think it's just the law that matters here, though that's certainly a problem. There are two other issues, namely immigration and market size.
The underappreciated thing about the US immigration system is the fact that you usually don't even need it. If you're a Silicon Valley startup, you have a pool of 330 million people to hire from, and they all live in your country, speak your language and are part of the same culture. Yes, the EU has free movement, but moving from Warsaw to Berlin, two European cities that are pretty close to each other, is going to be far bigger of an ordeal than moving from New York, Massachusetts, or even Texas or Alabama to San Francisco. Maybe not from a legal perspective, but definitely from a language / cultural / "how do I go to a doctor here" perspective. If you need very specific talent, like people with expertise in building distributed databases or self-driving cars, you're far more likely to find them amongst 330 million Americans than amongst, let's say, 2 million Latvians. This causes network effects to kick in, making America even more of a "magnet" for talented people.
The other issue is basically the same problem, except going the other way. In the US, releasing a product means releasing it to 330 million prospective customers at once. In most industries, if you release your product in English and can accept credit cards, most people that you'd want as your early customers can already buy it. This is not true in Europe, every country has its own language and its own take on online payments. If your startup touches the physical world or legal system in any way (think easier invoicing for small businesses, 21st-century software for hotel management, an easy website builder for private medical practices etc), this is even more of an issue. The problem you're solving might not even exist in some countries (maybe their government already provides a good app for invoicing), and where it does exist, it's hard to figure out its nuances without speaking the right language. This basically means those kinds of startups usually work on a local level, not a European level.