Horror movies usually end in one of two ways: with a blatant sequel setup, or a shocking stinger that chills the audience to their collective core and plays on their minds long after the final credits have rolled.
Scary movies with generic happy endings might well exist, but concluding on a bleak, tragic or unnerving note has been a genre tradition for generations, not to mention a better fit for the subject matter.
People pay to see these films because they want to be scared, jump out of their seats in a shower of popcorn, and return home to an evening of nightmares, so ensuring this happens at the end is simply the filmmaker taking a supply and demand approach.
A sad truth of horror is that the genre has become over-saturated across the generations. Everything has been done to death, including shock endings of virtually every variety, but it's important to remember the movies that did this stuff first, from the Hitchcockian classics, to the early slasher movies that inspired countless imitators.
These are the films that should be celebrated for saving the best scare til last...