The US can very well be home for someone born elsewhere. It would be wrong to assume that those people are somehow just temporarily staying.
I’d imagine the group of foreign-born people who are in the US on time-limited or otherwise precarious visas is a lot smaller.
If you're international getting a bachelors you need to find a company willing to sponsor when you graduate so it makes a lot more sense to pursue a STEM degree that is in high demand to employers.
For graduate students their is compounding pressure because getting a PhD allows the student to stay in the USA while they obtain the degree and STEM degrees qualify for the STEM OPT extension so instead of only having 1 year of work authorization post graduation you have 3 years. If the goal is to stay in the USA permanently it really doesn't make any sense to pursue a non STEM grad degree.
I don't have any commentary on whether the way the system is set up makes sense but I don't think it's just a case of American kids don't want to study these subjects rather theirs intense immigration pressure on international students to funnel them into STEM subjects.
Forty-two percent of California's workers in science, technology, engineering and math occupations were born in a foreign nation
Digging deeper, we see that 20.7% of foreign born with bachelor's degrees are in STEM occupations compared with 11.4% for similarly educated USA born
As of 2017, over 40 percent of the U.S. doctoral-level workforce was foreign-born. In computer sciences, mathematics, and engineering, nearly 60 percent of PhD holders in the U.S. workforce are foreign-born
What happens when these people start to go home? Why don't American kids want to prepare themselves for these high-paying jobs?