I was chatting with someone about bookish things, and we shared cliffhangers that had made us mad, endings that had made us quit series, and so on.
A romance writer friend of mine had once said that for her the sweet spot in romance novels was to end right as you were assured okay, they love each other, they got this, but that readers wanted to live in that moment and she felt this was why epilogues were popular in romance.
Now of course, could you do one more chapter where they are just happy? Sure? But I think some readers will worry. So the framing of an epilogue says, look, no more shenanigans, here they are just happy. Except that sometimes the epilogue also hints at what's come. The roommate calls and confesses they are pregnant, unexpectedly married, in the hospital, just enough so you go oooh, what happened to roommate?
Now have I read books that did not do this? Of course. Am I mad at some of them even though, yes, if you promise me the amnesia will be resolved in book 3 I will grudgingly wait. Sometimes. And sometimes that hint was too much and the next book wasn't out yet and I quit.
In some ways I think this is what Marvel has been trying with these post credits scenes. Something that doesn't fit in the movie, but gives you a few more moments with the characters and a hint at what's to come.
And of course season finales, particularly in the days when TV shows had a guaranteed next season, often tried this too. Raising something that you could talk and speculate about for three months, but didn't make you so mad you quit. I actually don't think I ever quit because of a season finale, although the cumulative realization that "Grey's Anatomy" was going to kill off everyone once a season grew to be too much for me.
Kristine Rusch did a post earlier this year about the importance of endings, and one thing rewatching and even re-reading things has often shown me, is that many times, the parts I remember most are near the end. Now sure I read that more recently, but like giant plot lines will be a surprise to me, but the ending, stuck in my mind forever.