The answer, as I’m sure many already know, is idealism and a certain kind of naïvité. It’s not an absolute naïvité, but it is some kind of belief in the value of doing something that isn’t “mere” careerism. You think it’s noble to contribute to science. And you do contribute, a teeny eensy weensy bit. You also find out that it’s not everything you imagined it would be. And then you’re 30 and one day you unblind yourself. You look at the job market, and how much money various jobs actually pay. More importantly, you realize quite suddenly that money can actually make your life better, and that, whatever damage it might have wrought on your soul to pursue it, it would at least have enabled you to own a home one day. Maybe have kids. Shit. And the fresh grads who went straight into tech and finance making $300k (hold on, you can make $300k? Wait a second, that’s not a senior executive salary? That’s a normal-ish bourgeois white-collar HCoL salary that people make fresh out of school? Hold on, that’s basically a starting salary in that world? WHAT?)… just naturally understood.
Then you try to explain this on a message board or something. You don’t want pity (after all, your life is very good in the scheme of things), you just want some connection, or maybe even a, “that’s ok, that’s how we learn, life is a twisty path.” But half the people call you a class traitor. The other half call you a mediocre sucker.