Can you provide more context for this? How is the cost of teaching a STEM student higher than the cost of a liberal arts student? The classrooms are roughly the same. STEM student labs might be more expensive to manage, but that equipment is/(can be?) funded by research grants.
While there are a massive number of private liberal arts schools, there are relatively few private STEM schools. Most STEM degrees come from public university that are significantly cheaper than private universities.
Hence why I said "overhead from research grants."
(1) Many grants have a mentorship / training / giving-back component. This is one of the merit-based criteria NSF reviews on.
(2) Research grants have overhead which feeds back into general budgets. At elite schools, this is about 2/3 of the money. A typical split might be 1/3 to the department, 1/3 to the school, and 1/3 to the project. It's kind of a financial scam. Nominally, these cover buildings and admin time. Practically, these feed into general budgets which do include labs and teaching. Corruptly, a lot of the money gets funnelled in creative ways to improve professor's lives through fancy faculty clubs, get-aways, and in some cases, creative (but legal) embezzlement with money ending in people's pockets.
One conversation that stuck was the me:
Back when I was in school, one of my mandarin teachers wanted to offer a "business mandarin" course outside of the general language program geared towards business students who might need basic fluency in a corporate setting. The school denied him because there wasn't a budget for it, which struck me as asinine at the time as it wasn't like there would be students who weren't paying tuition for the course anyway. The school had rooms available, and students have to buy all the materials the class would need anyway.