it's the modern version of aesop's fables--a way to share morals across a society through stories.
american westerns and chinese wuxia/xianxia are similar, simple morality tales wrapped up in different situations with heroes who rise out of the ordinary to do the extraordinary.
it's the simplest cultural glue.
Personally, my armchair theory on superhero media (and other fandom-oriented media) is that it's sort of becoming a nascent religion for people that aren't otherwise religious.
edit: Wasn't Iron Man the bad guy in the Winter Soldier film precisely because he chose to be law-abiding?
Large portions of fiction have generally always focused on people who were superior to others, at least in terms of cleverness, but often physical ability as well. Odysseus comes to mind. Extraordinary people are simply more interesting than ordinary ones, especially if your primary goal is to entertain.
I think the reason comic book superheroes in particular are popular is simply that they're easy to make and market than something that is less well known and less established; and from a business perspective, there's synergy in making lots of movies from the same universe because people like it when movies come from the same universe.
Professor Xavier is wealthy af. And he doesn't go around helping just anyone. His altruism is hecka parochial.
About the only common element is that the government generally sucks at doing anything. The only thing the government doesn't suck at is having at least one plucky SEAL/Ranger/Marine team out there that's fighting against the odds.
Writing this now I see your point was not that they aren't extraordinary, but rather the opposite of anti-wealth. I don't disagree, but I'm not claiming that every movie covers the same ideas either. However, the villains of Spiderman 2, for instance, are a bunch of Iron Man's lower level former employees who specifically call out how they got the short end of the capitalist stick, and how unfair it is that he got the spoils of everything, and how easy it was for him to dispose of them. The villains of Spiderman 1 are just some construction guys who got shafted by the collateral damage of the heroes and are trying to make a living wage. Yes; I do recognize the irony in that both of these working class groups are villains, but they're not meant to be portrayed as "Evil" for the most part. Again, not especially deep, but not "I'M GOING TO DESTROY THE SUN BECAUSE THATS WHAT VILLAINS DO!".
The captain america movies, seem particularly keen on the idea that the american government / law does not define the american ethos.
In the movies he seeks power for the sake of power at best, at worst does evil for the sake of evil.
In the comics his thought process is actually fairly reasonable when you consider he cannot read Superman's thought balloons nor see the cut-scenes where Superman flies to the farm and moans to his mom about not being able to do more. It goes something like this: "There's an alien among us. He has enormous power. He's doing good deeds for now - which happens to get him public support, which is even more power. There's no way to know his true intentions. He could be the prelude to an invasion. Even by himself, he could take advantage of a crisis - or manufacture one - and take over the world. And we're adulating him, defenseless against him... someone must fight him."
And having read the odyssey, I think it is completely different then typical superhero story. It is much less good vs bad kind of story, much less focused on action and much less about showing off supernatural skills.
Odysseus himself needs help all the time. Most of the time is spent feasting and talking. Or crying. The action parts are relatively short.
I mean, it is completely different.
I think the reason superheroes are all the rage is that they present usually simple, uncontroversial content that appeals to the broadest collection of cultures, ages, and educational/socioeconomic backgrounds - so they maximize their audience and thus the money they make. It’s simplistic and you don’t have to think too deeply about it. It doesn’t challenge your notions of society or speak truth to power. It’s just about good guys fighting bad guys