George R. R. Martin’s A Song of Ice and Fire series
The best example I can think of characters not getting what they deserve — for both the “good” and the “evil” characters — is George R. R. Martin’s A Song of Ice and Fire series. Throughout the books we see bad guys getting rewarded and good guys getting their heads chopped off. While somewhat disheartening, it is this exact characteristic of the story that makes it so very compelling. If predictability were to reign, good guys would always win and bad guys would always lose, at least in fiction. A Song of Ice and Fire reads truer to life (well, as much as an epic fantasy can) in that sometimes the good guys win, and sometimes they get beaten to a bloody pulp, and the same goes for the bad guys. There is no finite justice: there is only power and who wields it at any given moment.