It is common in fiction for the bad guys to lose and the good guys to win.
It’s how you would like to see the world- just and fair.
In psychology, the tendency to believe this is how the real world actually works is called the Just-World Fallacy.
More specifically, this is the tendency to react to horrible misfortune, like homelessness or drug addiction, by believing the people stuck in horrible situations must have done something to deserve it.
Very interesting article.