When I graduated, back in the mists of history in 2004, you'd be crazy to assume that a 5th year engineer salary package would be approaching $300k. There was a huge salary gap in finance's favor on day one, it got bigger every year, and it exploded once the financiers started to hit their 30s. That gap has narrowed considerably, at least for folks on that trajectory in their 20s. (I'll confess to not having a great understanding of what it looks like to be a 32 year old at Google. I mean, any 32 year old at Google who was with them in 2004 is now a multimillionaire several times over, but I don't know what the reasonable modeling is for expectations for being 32 in 2024.)
The folks who think they're going to be in the top 10th of engineers AmaGooFaceSoft hire this year in terms of career success 10 years out now have a reasonable expectation that that will be as lucrative as a top 10th finance career.