Endings are very important. You can enjoy a story all the way up to the end, but sometimes the actual ending will be so bad it retroactively makes you hate the rest of the story.
Many say that the worst ending is “And then I woke up and it was all a dream.”