It's a given in storytelling that you make your heroes go through all sorts of suffering and injustice to keep readers coming back. Stories where the hero is treated well and triumphs easily are less compelling.
Lester Dent had a master plot and guidelines for when he was writing the best-selling Doc Savage pulp. Basically, it said to keep piling trouble on the hero, make things go wrong, give him a hard time all the way to the end. It's a formula that works.