The Shandys put the Ringling Bros. to shame: the ending is one crazy circus. Obadiah got married on the same day he took his cow to be impregnated by Mr. Shandy's bull, after his wife has already given birth. Since babies and calves gestate for about the same amount of time, Obadiah figures he's owed a cow as well as a baby. In the last chapter, Obadiah accuses Mr. Shandy's bull of being sterile. The poor bull has to service all the cows of the parish, and he's not up to it—so to speak—at all.
The company—Toby, Obadiah, Dr. Slop, and Yorick—try to figure out if Obadiah's baby was early by how much hair it has on its head. They argue until Mrs. Shandy interrupts asking what this story is all about. "A cock and a bull," says Yorick, "And one of the best of its kind, I ever heard" (9.33.17).
If you feel like putting on your detective hat, the ending provides a clue as to whether Sterne actually finished the novel. Tristram talks a lot about his big plans—he's going to write two novels a year; he's going to write for forty years; he's going to write until he catches up the present—but Sterne stops after only nine books and eight years. Did he stop because he was too sick to write any more (he died in 1768, not too long after publishing Tristram Shandy's final book)? Or did he stop because he'd gotten his story out?
Clue #1: In this closing scene, almost all the story's major players are gathered together around the table. Plays often end with the whole cast, or nearly the whole cast on stage—it gives finality and wraps up all the relationships. The fact that everyone's on the page at the same time hints that Sterne wanted to bring things to an end.
Clue #2: The cock and bull. Yeah, it's a dirty joke, because it's actually about a bull's penis. But it also says something about the novel as a whole. A "cock and bull" story is a rambling, directionless story—exactly what we've been reading for the past nine books and 700-odd pages. Yorick's closing line sums up the whole novel as nothing but a rambling story without an end (that's why it's so hard to analyze the plot).
Clue #3: The cock. Tristram Shandy is obsessed with penises. From Mr. Shandy's concern about the size of his "nose" to his worries about Dr. Slop's forceps tearing off Tristram's penis, to the circumcision, to Toby's ambiguously injured groin, to Tristram's wandering pen, penises are scrawled all over the novel—it might as well be a middle school bathroom stall.
When you add up all these clues, it seems likely that this last scene is Sterne's curtain call. He may have known he was dying, or maybe he was just tired of writing. It doesn't really matter why; what matters is that he cleverly finds a way to bring an end to all the digressions and rambling in a wry, sly, and satiric way: he dismisses the entire novel that he's just spent eight years of his life writing. It's a truly Shandean move and the perfect ending for a Shandean book.