That's an unnatural/weird way to look at it.
If the engineer provides $500k value per year, and they get paid $500k per year, the company makes $0 profit. By that logic, the only way to not be underpaid is for the company to be in the red; but if that happens, there won't be a company to pay you!
Plus, it's likely any other engineer could provide the same value. So (as always) it's about supply and demand. In this case, there are a lot of qualified engineers that want to work in games, and relatively few positions.
Unions could affect that, but I think it'd do more harm than good at the high end (it would definitely help lower paid positions like QA though).
Maybe if Epic wins their case against Apple, it'll unleash a tidal wave of anti-trust lawsuits against the likes of Sony, Nintendo, Microsoft, Google, etc. and the game industry will explode with new business opportunities, new investments, and new jobs to balance out the supply/demand curve for game developers at all levels!
(...or not)