I was thinking about posting this anyway, but it's quite relevant to some of the things Jason says in the post below. You see the occasional conservative argument that tenure is a corrupt institution designed to give cushy lifetime employment to soft left-wingers who don't want to deal with the rigors of competition. But most labor economists I think view tenure as a pretty rational market adjustment to the particular circumstances of the academic labor market. For a couple of reasons.
One is precisely the reason Jason discusses in the post below -- the mixed motives of senior faculty in hiring junior faculty. Academia is a field where it is very difficult for outsiders to assess quality at the cutting edge, and where (partly for this reason) departments self-govern. Concretely this means that it is generally senior faculty within a department who are deciding what junior faculty to hire in that department. If there were no tenure, then senior faculty would in effect be hiring their direct competitors for future employment in the department. There would be a very strong incentive not to hire people who you felt might become better than you and throw you out of a job. Therefore tenure makes it possible for the senior faculty to manage the department. Without that you would have to have some kind of cumbersome and difficult external review process for every new hire. But note that the difference from Jason's discussion is that the problem is within-department; there's no need to assume that senior people want to blackball junior people within the entire profession. Within-department is really where incentives for senior people to game the system would become pretty overwhelming without tenure.
There are a couple of other reasons tenure makes economic sense as well. In most academic fields people are asked to devote many years to learning very specialized knowledge. There is a very thin market for their services, with often only a few institutions in the world that would pay them for their specialization. It's reasonable for people to ask for job security in exchange for devoting a lot of time to learning highly specialized knowledge; otherwise they'd essentially be screwed if they lost their jobs. The alternative would be to pay people very high wages to compensate them for the risk they take in specializing so strongly. Academic institutions probably couldn't afford the wage premium. Think about the wages that would be necessary to attract people to spend five years in grad school followed by an uncertain job market if there wasn't the prize of tenure at the end. Essentially, academic institutions are promising something they feel they can afford to give (freedom and security) in exchange for something many can't afford to give (lots of money).
Ex ante then, tenure makes a lot of economic sense. Ex post (once people have received tenure), there may be a moral hazard problem in the sense that some people slack off. But those costs can well be worth it once you look at the utility of tenure for the institution over the overall academic career. If tenure didn't exist, we'd probably have to invent it.
By the way, these arguments are strengthened to my mind by the fact that the most decentralized and competitive higher education market in the world (the U.S.) is also the one that makes the most universal use of tenure.