The reason why that happens is not really Europe's fault. Any remotely-competent developer just works for US companies, why would they not? Especially for AI, there just isn't enough investments in the EU to offer those salaries.
What's left are incompetent developers paired with people who get government contracts and leech off them. Ask me how I know.