You say this but there's a reason our tech salaries are way way higher than most other countries.
An Amazon tech worker on average will make 250 to 450k total comp a year.
Anyone working for these big companies in the engineering fields is easily making 300k a year and up after rsu. Those salaries dont exist in Europe. Some companies offer close in the UK etc but... That's why people stay in the us.
Also if we don't like our salary we just go hop to another place for a raise.
The us sucks for people without an in demand skill like basic laborers or unskilled workers. It's amazing for folks in a market with demand.
(Source I hire and work in both regions. And have looked for ways to move to the eu region.)