Why are tenure-track professors hired on the basis of their research when they spend most of their time teaching? I was just looking at a different post that cites National Center for Educational Statistics about how professors of all levels spend their time. I am actually doing some research on faculty hiring practices at research universities.

How much time do professors have to do research on their own?

The thrust of the data is that most professors, whether tenure track or non-tenure track spend more than 50% of their time on teaching. I imagine this data is averaged across both research and teaching universities, but still teaching must make up the bulk of time or even professors at research universities--whether that be teaching classes, mentoring grad students, committees, etc. 

But at the same time, I know that the hiring criteria for the research universities focuses on publication records with little if any concern about teaching evaluations and such. I am not trying to make a critique or political point, this is just something that I have understood from my interactions with professors and other graduate students. 

Now my assumption is that most research university departments get the majority of their money from student tuition. I might be wrong about this, and if I am wrong please let me know. We also know that the ability to do research does not always correlate with teaching ability. 

So I want to understand the mechanisms that allow research universities to continue to hire professors who are not necessarily the best teachers? Of course, there are many amazing professors at universities who are excellent teachers. I am not trying to make a blanket statement by any means. I just mean that you would probably get better teachers if the primary hiring criteria was teaching ability, right. 

By mechanisms I mean, if student tuition is the main source of money, then why do students keep paying for classes taught by not always the best teachers? Or is there just so much money coming into research universities from grants, etc., that they can afford these large professor salaries despite the loss of undergraduate students? Like how does this actually work?

I imagine part of the answer to this question is associated with the growth in non-tenure-track faculty like adjuncts. That seems like it would solve some problems. But still why can universities who seem to get most of their money from students, get away with paying so little attention to students when it comes to hiring faculty?

Any insights are welcome. Again, if I phrased anything indelicately, please forgive me. I was not trying to cast any aspersions on anyone. Just purely thinking from an economic rationale.
Because they don't spend most of their time teaching.  For example, officially the expectation is that I spend half my time on research, a third on teaching, and a sixth on service (e.g. administrative responsibilities).