I do think that the sky high salaries are ridiculous compared to societal contributions of, say, a nurse or a teacher. But I also like very much that I get them for doing a job that I still do with a small on my face.
I got into this line of work because it's fun. It's still fun. If I didn't get paid I'd do it for free, although "it" would be lime green hobby projects rather than the productive and tasteful work people employ me to do.
Personally I recently quit my high paying industry job and moved to an engineering heavy PhD position (HPC), because I enjoy solving complex problems.
Huh, this is interesting, maybe in some areas of America? But broadly speaking... Outside of America, no. Take a look at even senior dev salaries in Canada.
They're equivalent to master's of social work positions, oftentimes less. Having had education and work experience in both social work and computer science, I can tell you that if you want a stable, low-stress job that requires an "easy" degree, that MSW degree will serve you far better.
Not to mention that remote work is still rare. So that 90k senior AI research job, requiring a Phd at the Autodesk office in Toronto is... not great. Most computer scientists I know are happy with being middle class and just really enjoy the subject matter. Maybe this is rare in your area of the world?