Honestly, I must confess that the title misled me quite a bit. At first I thought it might be an irony against "happy endings" as in a massage, with "screw" being the insult but adding hilarity because it a double entendre usually used to mean sexual intercourse, e.g. "I screwed that chick last night. You know, the one from the pantry?" "That was a vacuum cleaner."
Anyway, I think happy endings are used in most movies nowadays because of the child inside. Imagine yourself a child, and reading a story book about Batman that ended with Batman being ripped in half by the Joker and the Joker takes over Gotham City. You most likely wouldn't read Batman comics anymore, would you? It is about appealing to the good nature of humans, so as not to have riots, people burning movie theaters, et cetera.
Think about the movie The Princess Bride. The boy kept interrupting the story with suggestions about improving the story, and objections to what has happened so far, because he thought these things "just shouldn't happen" and that it couldn't be possible. It makes people upset to think about things that aren't happy. It makes people feel better at the end of the movie, like in the movie Life with Eddie Murphy and Martin Lawrence. At the end, (SPOILER)you think they die, but they actually escaped and went to a ball game.
It just gives a good feeling at the end of the story that makes you appreciate more what happened. Purely psychological.