Software engineer salaries in the US are significantly higher than electrical and computer engineering salaries and have been for a whole. Most of the bright and ambitious EE and CE people went to faang companies in 2010s and probably earlier too.
A big reason why TSMC is competitive on the global market is precisely that their wages are low.. Granted, they don't have a finance industry or big tech to draw away talent.
I had a great job in R&D at Intel, in a department full of PhDs, in the 2010s, then jumped to another semi company from 2015-20.
Just before the pandemic in 2020, I got a job at AWS as a software engineer. It wasn't the only reason, but it was clear that I could make a lot more money in software.
I quickly became disillusioned with almost everything about how large software companies work, and now back working as a data scientist for an advanced manufacturing company 5 years later.