The nature of comics is that of a serialized narrative. Each issue ends in a way that is meant to inspire readers to purchase the next issue, either with cliffhangers, major reveals, or an indication that whatever closure the hero has come to is only temporary.
But an unfortunate truth about serial art forms is that they must, at some point, come to an end.
And even if that ending is nowhere in sight, individual stories, issues, and sub-plots need to be resolved to satisfy the audience. A story that never ends is unsustainable and doesn't allow for character resolution and growth. But another unfortunate truth is that endings, even the happy ones, are usually pretty sad as they indicate that whatever was worth reading about to begin with is now over.
This hits much harder in the realm of comics as they are built around characters that audiences are meant to identify with or idolize on one level or another. Seeing them go through these gut-wrenching endings makes it all the more devastating for the reader, who has to experience it alongside them.