Well, are you talking about the way things are, or the way things should be?
But, let’s unpack your claim.Which one(s) of the following things do you mean?
A. University professors are, or should be, teachers first and foremost: teaching classes should be their main job.
B. Regardless of how eminent or good at other parts of their job they are, university professors who are bad teachers should lose their jobs.
C. University professors who are eminent or good at other parts of their jobs but are bad teachers should have their responsibilities (re)assigned so that they do not involve teaching (or at least teaching things that they are bad at teaching).
If your claim is A, then either you do not understand what a modern research university is, or you want it to be something very much other than what it is (in which case there certainly is debate on the issue), or you’re not talking about research universities at all but about some other type of institution.
If your claim is B and/or C, I’m inclined to agree. The extent to which this is already true, and the extent to which it should be true, and the extent to which it is even feasible, are going to vary from university to university and from department to department within a university, for various reasons.
However, I don’t think the existence of tenure is any major part of the problem (though the basis for awarding it may be). In the case of the professors you had who “sucked,” I don’t know for sure, but I think it highly probable that they were not good teachers who turned sucky after receiving tenure, but rather that they were awarded tenure based on factors other than their teaching ability.
But what’s it going to take to change that? In a way, insisting that “students go to the U of Wherever to get an education” is a bit like saying “customers go to Walmart to buy TVs,” and that therefore the Walmart employees should be knowledgeable about TV brands and features and should be able to help customers select the right TV for them, and maybe help with delivery and setup. If that’s really important to you, you might be better off buying your TV elsewhere. But as long as enough people buy their TVs from Walmart, Walmart has no incentive to change the way they sell them.