Why are tenure-track professors hired on the basis of their research when they spend most of their time teaching?
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).