The reason is that you are comparing to the outlier: the US.
Salaries for software engineers in Europe are high, extremely high compared to the general population in terms of standard deviations.
The difference is that salaries in the US are more or less uncapped, that benefits a lot us, software engineers, but not society. For society my work as a SWE isn't worth 3x of a nurse, even though economically it makes sense as I bring 5-10x profits to the company I work for as a SWE, just due to the leverage I can be used as to produce value in monetary terms.
If the only thing you care about is the figure in your bank account, for all means the US is the best place on Earth for you to try your luck. For people like me, who want to live a happy and comfortable life instead of grinding and living with the stress of all insecurities caused by the US approach to society... It's not a pretty game to live in that kind of society.
I posted not long ago the same type of comment, I have a personal anecdote as I moved from a country that is very Americanised (Brazil) to Sweden, the American philosophy of life (individualistic, "got mine, fuck you") only works in the US, with lavish sums of cash flowing around so some of it can drip into normal society. Living in a completely different environment only showed me how sick this kind of living is, how unhappy it makes the average Joe.
Good luck as a SWE in the US, it's a cushy place to be. Personally I still prefer to take-home 1/3 of what I could manage in the US but have a much more stable and comfortable life, because the rest of society here also enjoy a stable and comfortable life together with me.