It's simpler than that. "Prestigious" universities emphasize research prestige over all else on faculty. Faculty optimize for it and some even delight in being "hard" (bad) teachers because they see it as beneath them.
Less "prestigious" universities apply less of that pressure.
It can also be different within the same university, by department. I graduated from a university with a highly ranked and research oriented engineering department. I started in computer engineering which was in the college of engineering but ended up switching to computer science which was in the college of arts and sciences. The difference in the teachers and classroom experience was remarkable. It definitely seemed like the professors in the CS department actually wanted to teach and actually enjoyed teaching as compared to the engineering professors who treated it like it was wasting their time and expected you to learn everything from the book and their half-assed bullet point one way lectures. Unfortunately or fortunately, depending on your view, it also meant having to take more traditional liberal arts type electives in order to graduate.