Well, the richest country on earth can afford that. Nearly everybody else cannot. China probably does. The EU could if they would manage to collaborate.
EU countries are domestic competitors to each other economically and culturally, always have been for hundreds of years, hence the constant wars. They're only united politically in the EU when it comes to negotiating international issues.
For example, an EU country won't hesitate to torpedo another country's energy, economy or industry plan if they can score political points at home for their voters or to protect their own domestic industry players from the other members. That's also one of the reasons why Switzerland and Norway refused to join the EU.
EU is like a marriage between 27 people instead of 2, always at each other's throats but never(until 2020) divorcing. This is not the ideal environment that scales tech companies. That's why there no big tech from Europe.