well, the professor certainly can't just stay as long as s/he wants to. i guess they keep on hiring them a couple years at a time until they don't want them anymore?
i think i remember a prof like that in undergrad, he was an utter failure but stuck around picking up the crap classes for a while. For the most part, though, from what I hear, as soon as a professor goes up for tenure and is rejected, they start looking for jobs.
I'm not sure if he knows how bad his outlook is (I just hear gossip from the other profs in the department), but even if he did he wouldn't tell us (his grad students) about it since he's not very open about that stuff.
I have the fortune of being almost finished, but some of the other guys in my lab I imagine will run into complications of the old boss decides to take off before they're done.