It's really easy to think that a set of life decisions are good because they worked well for you, but that's not how the world works: Across every road, there are a lot of events we cannot control, decisions made with imperfect information. We make mistakes, we fail, through no special fault of our own. Every path is great if you are talented AND lucky. But it makes no sense to evaluate a road by just looking at the top successes: If that were the case, I'd tell my son to go into acting, because it went great for Tom Hanks and Brad Pitt.
No matter how hard you work, or how talented you are, the very top is something we cannot guarantee to anyone. So it's pretty rational to look at a career path, a set of life decisions, by looking at average cases, not just the very top.
Going out there because you are curious about the world, and ending up doing something where only the very top percentiles do well is only a great story if you win. I know a girl that went with those lofty ideals into psychology, along with a high IQ. She now answers phones at a call center. Two PhDs in biology: One is teaching English in Japan, because she couldn't bear a 20+ year post doc path, getting paid less than half of what I made in my first job out of school. My brother, top of his class in biology too. Got a Phd with honors. But he was born in the wrong country, and his best job offer is for a position that asks him to do 10+ hour days, rotating into the night 1'3rd of the time, all for 850 euros a month. Welcome to a country with over 20% unemployment.
So it's really easy to think it's important to have curiosity as long as you also pick a profitable course of study too, or are quite lucky. Otherwise, it's the same mindset that can dig you into a hole.
Picking a career just because of the money, and not getting any love for it as you go is a road to failure too: Many people drop out of programming for those reasons, and few options are more profitable on average than programming. But I can't blame people for keeping an eye out of the available options. I know I did: There were many things I thought I would have enjoyed doing, and I picked one that also looked profitable. I can't say I regret it.