If you ever talk to a university dean or professor, the aim of a university to educate undergraduates is secondary. Most of the engineering budget comes from research grants to the department. At best, the jobs of a university is to educate graduate students and to conduct research from which to receive further research grants. I was told that a MIT's EE professor brings in 5 times his salary in research grants. So, as long as this happens, the university carries on. However, in times of intense growth or economic boon, it is more lucrative for both parties involved to hire a professor outright. I guess the major factor for many professors to not leave their university is that they think that maybe working in industry might draw them away from research and risk making them obsolete in case the tech changes. Also, universities tend to make the path to becoming a full tenured professor quite a journey, where each stage requires a considerable investment in order to be vetted by your peers. Many professors put up with this because they think that get stability and respect at a university. Technology has a half life of maybe 5 years, so even if you are an expert in something hot, it will eventually become passe.
I remember reading an article in Newsweek about some researcher who was able to transfer the bioluminese gene from jellyfish to other organisms in the mid 1980s. At that time, it was a ground breaking achievement. Now, he was working for a little bit better than minimum wage at Hertz Rent-A-Car in Madison, AL.