The title of this novel seems generic, at first – "The Mayor of Casterbridge." Sure, OK. It's going to be about a guy from a town called "Casterbridge" who becomes the Mayor. But the subtitle gives away something pretty major: it's about "The Life and Death of a Man of Character," so we're told that this guy has a reputation for good principles.
We know, just from the title page of the novel, that our friend the Mayor is going to die. Sure, everyone dies eventually. But usually a novel ends with the main character "living happily ever after." Not in this book, though! Does knowing from the get-go that the Mayor is going to die detract from the suspense or make us lose interest in the novel? Not really – what's important is finding out how he spends his life and what happens to him before he dies.