That's because once you have a runaway success the US will tax you lower and your quality of life will be higher than what you can achieve in Europe. The USA is a great country if you're on to a winner. So the vacuum cleaner in SV tends to suck the air out of a lot of EU successful start-ups and engineering efforts simply because that's where the money is. Typical start-up valuations in the USA dwarf those in Europe, access to a single unified and mostly mono-lingual market are far more of a factor than any EU regulations, that's just a dumb meme that gets tossed around by the clueless. Yes, taxes are higher. But so is average quality of life, as opposed to average GDP, which relies on outliers.
Despite being less wealthy and diverse in both language and culture, China and India produce more tech unicorns than the EU. Several smaller countries, like Singapore and Israel also do far better than the EU on a per-capita basis.
I'd attribute most of the gap to regulatory and cultural difference.
EU is also not uniform in terms of language - so most EU companies need to decide whether they go global and start in a foreign (English) language or begin in their native language and risk getting locked in there.
I’ve been mentoring startups in EU for over 10 years and there were only a handful that had issues with regulation, but 95% had issues with a language/country lock in.
You missed the per-capita examples of Israel and Singapore. If either had the population of Germany or even that of Spain, they'd have more unicorns than the entire EU.
It's not striking that the EU is as wealthy per-person as it is and has so few tech unicorns. It's also not striking for a region with hundreds of millions of people. What's striking is that despite being wealthy and populous, the region hasn't done too well with tech.
I'd say that it's even changed during my own lifetime. There was a time when German cars had a much larger market share and Nokia was a dominant phone company. Nokia failed the transition into the smartphone era and while German cars are still great, their market share in EVs is much, much smaller. And it's not like there's a lack of talent. Plenty of Europeans are building huge tech companies, but a large fraction are choosing to do so in the US or other similar markets, like Canada (e.g., Shopify).
GDP always gets trotted out as if it is a holy grail and a benchmark for social welfare, which it isn't so think of it as a (failed) preemptive strike against getting a longer comment thread.