I have a very high quality of life here, strong protections as a permanent employee (increasingly less common in other industries in Germany, but not in tech!), a salary that is excellent compared to many of my peers, and comes with a purchasing power that I imagine meets or exceeds someone in my same position in New York or the Bay Area.
I won't pretend there aren't downsides (for example, stock as compensation is rare here, and not incentivised by the legal situation), but for me the upsides win over raw actuarial comparisons. I'd much rather have my compensation in Berlin than trade it for 2x or even 4x that in the US.
(Edit to add: once you bring rent, medical insurance and associated out-of-pocket costs, and paid time off into the picture, compensation in the US starts to look like a pretty raw deal IMO.)