but they did kill the villains

but yes, the reason for the trope is that it was a popular thing to do in Hollywood movies for a long while. you see it in comicbooks because of that.