Happy endings are important and are looked forward to as they instill hope, a belief that the obstacles can be overcome and that the good will win over the evil. This applies to writing books as well.