The common complaint is that if you give someone tenure, how do you make sure that the person continues to do research? Couldn't someone just show up to teach their courses and spend the rest of the time on the golf course?
Let's look at some of the factors that make this not happen very much.
(1) We do not play golf. *
(2) Tenure at a research university is a license to do research with nobody bothering you. To get that far, you have to like scholarship more than a little. You've invested a lot in developing your research to a certain point, and it takes a life of its own: you are invited to submit articles, to give talks.
(3) Your annual evaluations, raises, and eventual promotion to full professor depend on research. Your pride and place in the profession, your ego.
(4) I know people who don't publish a lot, but sometimes that's because they barely squeaked by for tenure. If you really look at the typical "dead wood" type, they were never much in the 1st place. Maybe they got tenure in a climate where the institution didn't demand very much. Maybe they have other talents aside from research and are excellent teachers, administrators, and not dead wood at all from that perspective. So tenure didn't make them stop publishing, just stop pretending to care.
*Yes, some academics play golf. That was a joke.