Disclaimer: I just skimmed a bunch of Wikipedia articles and old stories. I think I got the gist of the history about right, but can't claim this to be authoritative.
tl;dr- Robin Hood was never really meant to be a good guy. Instead, he was a brigand who ran a criminal enterprise, much like Al Capone. Early stories noted how the criminal enterprise's interactions with the community did end up helping some of the poor, and his stories became more-and-more subverted over time until he was an edgy anti-hero while those who he hurt were recast as villains to match. Because of this, Robin Hood isn't really meant to represent a consistent moral/ethical philosophy, but rather he's a consequence of iterative reformations.
Robin Hood's transformation seems analogous to how undead monstrosities like vampires have been subverted into edgy romantic characters in the Twilight series, a pirate captain was softened in the Pirates of the Caribbean film series, etc..
Robin Hood was a mobster who later writers tried to subvert.
Wikipedia lists three early stories about Robin Hood:
"Robin Hood and the Monk";
"Robin Hood and the Potter";
"A Gest of Robyn Hode".
These stories make Robin Hood sound like an early-1900's mobster, e.g. Al Capone. For example:
Robin Hood has a criminal organization that helps him to commit crimes, evade law enforcement, break out of jail, etc..
Robin Hood takes what he wants by force, killing those who get in his way.
Robin Hood kills witnesses, including children.
Robin Hood seeks to have an "understanding" with law enforcement, where they're to stay out of his way (or pay the price).
Robin Hood has people kidnapped to entertain him when he's bored.
Robin Hood does people major "favors", but it seems to have a mobster-vibe to it, where he expects the favor-recipient to repay him at a later date when called upon.
Robin Hood blatantly lives off his criminal lifestyle, without any pretense of having any sort of honest profession.
Robin Hood smacks around his subordinates for no good reason, but they take it because Hood's their "master".
I think any reasonable person would conclude that Robin Hood's an evil character. Robin Hood really sounds like an early Al Capone.
Early works point out that Robin Hood's criminal enterprise helped some.
All that said, mobsters try to have a relationship with their community, and Robin Hood seems to be no exception. So, all the blatantly evil acts like child-killing aside, someone could try to see the good in Robin Hood. One of those three early stories, "A Gest of Robyn Hode", starts off by calling Robin Hood a good outlaw, then concludes:
For he was a good outlawe,
And dyde pore men moch god.
–"117A: The Gest of Robyn Hode"
, which I'd translate as:
For Robin Hood was a good outlaw who did poor men much good.
While stressing that I just skimmed this stuff, I think they're saying that a mobster like Robin Hood can still be a good force because his lifestyle, while criminal, has a redistributive effect that ends up transferring wealth to the poor.
The big point here is that it seems like Robin Hood enriching the poor was more of a side-effect of his mobster lifestyle and criminal code. And that, while Robin Hood did kill law enforcement, witnesses, and even innocent children, he still has an "enlightened self-interest" that compelled him to do good-ish deeds when doing so suited his purposes, which had a positive effect on many.
Tangentially, evil-people-doing-good-for-some seems to be a theme that could be recognized. I mean, if you think of just about any evil character throughout human history, it seems like most of them at least tried to benefit those in their inner circle. Likewise, Robin Hood sounds like he was (mostly) beneficial to his associates, if we ignore stuff like smacking them around.
Writers may subvert tropes to be more ethical.
A recent (2019-08-20) question from SE.Writers,
asked about including fantasy races seem like they may racist caricatures. For example, apparently there's a concern that big-nosed, money-grubbing goblins could've been an anti-semitic caricature.
But, given that fantasy races like goblins can be popular, what's an author to do when they want to write a narrative without perpetuating immorality? One answer seems to be subversion: to keep much of the same old story, but subtly transform it into something less undesirable.
Robin Hood's stories seem to have become increasingly subverted. He went from being a violent mobster to being an edgy anti-hero. He stopped killing so many innocents, and when he fought law enforcement, it was because they were evil, and all to ultimately help the poor through charity.
Conclusion: Robin Hood was never really a good guy.
Modern childhood fables of Robin Hood stealing from the rich to give to the poor seem like a consequence of a legendary mobster getting reformed rather than being truly about an ethical stance.
Much like how pirates have been reimagined, e.g. a less-evil Jack Sparrow in the Pirates of the Caribbean film series (2003–current), Robin Hood seems to have been a reimagined brigand.
In short, I don't think Robin Hood was ever meant to represent a moral/ethical philosophy; instead, he's a subverted brigand.
Pop-culture trivia: This was parodied in The Simpsons.
A common theme in reflecting on America's founding fathers is that, for whatever good one might attribute to them, they founded a country in which slavery thrived for a time. For example, Epic Rap Battles of History: "Frederick Douglass vs Thomas Jefferson" has Frederick Douglass chiding Thomas Jefferson for this.
The popular Broadway play, "Hamilton: An American Musical", tries to protagonist-ize Alexander Hamilton, and we end up with that apologist tone in "Who Lives, Who Dies, Who Tells Your Story", where, in eulogizing Hamilton, his wife, Eliza, reflects:
I speak out against slavery
You could have done so much more if you only had—
, suggesting that Hamilton would've tried to do more good, like fighting slavery, if only he didn't die prematurely. This point seemed almost necessary to address the elephant in the room, where a racially diverse cast was a-historically reenacting a predominately racially white narrative while honoring a historical figure who was involved in founding an institution popularly criticized for having allowed racism including slavery.
Some folks seem to have found this awkwardness ripe for parody, such that in The Simpsons, Season 30, Episode 20, the Simpsons family ends up analogously honoring their hometown's founder, Jebediah Springfield, who they note for racism:
an out-of-town'er [Jebediah Springfield]
was our found'er
despite his latent bigotry
So that, at the end of the Hamilton parody, they reproduce this apologism:
I didn't fight for equal rights, I wish I'd done more for non-whites..
..but no more time for Jebediah...
This is a recent main-stream pop-culture recognition of the tenancy for writers to subvert historical characters toward being more sympathetic.
At the same time, Hamilton's primary rival, Aaron Burr, ended up lamenting his actions, self-describing himself as having become the villain:
I survived, but I paid for it
Now I’m the villain in your history
I was too young and blind to see...
–"The World Was Wide Enough"
This seems analogous to how the Sheriff of Nottingham becomes villainized over time, making Robin Hood's opposition more sympathetic (and, apparently, some would find arguably heroic).
There're tons and tons of examples of this sort of thing, but dunno how to concisely exemplify them. But, that above example shows a case of an American founding father in a major play, musical, and soundtrack, tying in a popular YouTube channel and then a major television series, so... that's my attempt at showing a modern example of this process happening.
With the point being that this seems to be what happened to Robin Hood, rather than Robin Hood having been originally imagined as a moral/ethical character.