Oh hey, thatās my area of expertise hobby.
Bandits-Folk Heroes, aka Noble Bandits (not of the nobility, just noble in character), aka Robin Hoods
Pick a country, search for āRobin Hood of [country]ā, and youāll find tons, everywhere, in legend and/or history. Theyāve been around for thousands of years. Rome had Bulla Felix, for example. In 1969, Eric Hobsbawm wrote a whole book about them, called Bandits, and argued that these folk heroes expressed a primitive social revolt. The matter is strongly debated to this day, but itās hard to argue that they were not perceived that way in their legends (even if said legends donāt track with reality at all, which they usually donāt).
So letās be clear about what weāre talking about.
real bandits who became folk heroes: 100% true, thereās zero debate here.
bandits who stole from the rich: Well yes, see, the poor donāt have any money, so stealing from the rich is an aspiration, really. Plenty of bandits would steal from the poor (and if you were very unlucky, THE poor), and it wasnāt pretty, but it also didnāt make them legends. By definition weāre talking about more successful criminals here, who robbed important and wealthy people on the road, or raided their estates, or kidnapped them for fat ransoms.
bandits who gave to the poor: That DID happen, but most of the time it wasnāt quite like Robin Hood. If you imagine bandits running around with with a sack of gold and redistributing all their loot to the poor oppressed villagers, itās extremely rare. Off the top of my head, the only historical figure who actually did that was Pancho Villa, both in his bandit days and his revolutionary days. (That man robbed banks and remained penniless, because he literally gave it all away to people in need. But that man was an exception.) The typical bandit M.O. is not redistribution, itās charity, and favours for favours. Iāll give you money to cover your daughterās dowry, surely youāll shelter me from the authorities if the need arises. Iāll give you a stolen sheep, you keep your mouth shut if anyone asks about me. Iāll give you a tip to take this message to my allies on yonder hill. Iāll be generous to your whole village, and I expect one of you will come alert me if the soldiers arrive. It didnāt have to be directly tit for tat, bandits often built a reputation in general and relied on word of mouth and their popularity. Oh, and the reputation for generosity often went hand in hand with a reputation for being ruthless to informers.
bandits who became folk heroes BECAUSE they gave to the poor: Thatās not a given, actually. This element may be absent or inserted later, and itās always exaggerated even when it does happen. Sometimes bandits become legends simply because they stick it to the Man, and embody a peasant-friendly worldview thatās at odds with the ruling classās (this is Hobsbawmās thesis). Or because outlaws are cool, and violence is exciting. Sometimes bandits are 100% reactionary, but are still perceived to stick it to the Man (Jesse James springs to mind). Sometimes they become symbols for an oppressed ethnic demographic. In these cases, their legend SWELLS if said demographic ends up with a nation-state of its own. Now the bandit gets officially promoted to a patriot who fought for freedom, whether that happened or not, and it gets real hard to tell apart fact from fiction.
What happens when āthe people in power start putting the screws to the people youāre helpingā?
Broadly speaking, this is how bandits get caught. Someone talks, either for a reward or out of fear (and like @howtofightwriteāā said, that someone may well be a fellow-bandit who turned), and the bandit gets ambushed. If the bandit falls in a fair fight, he fucked up: he shouldnāt be in a fair fight at all, the whole point of banditry is to strike fast, catch people unprepared, and immediately fade back into the wilderness where no one can find you.
The locals youāre helping are also helping you, and in fact theyāre indispensable. Without them, you have no shelter, no food, and no information. Forget Robin Hood, heās made up. In the real world, bandits donāt retreat to a safe hideout in the woods, they MOVE. So theyāre either the aggressive sort who wreak havoc wherever they go, like armies āforagingā in enemy territory, and never ever qualify as noble (usually these are a product of war: robber knights, or disbanded soldiers, or desperate civilians whoāve lost everything including qualms), OR theyāre the smart sort who make common cause with the locals, and forge relations with them, and take care to operate in areas where they already have kith and kin. So āthe people youāre helpingā are not random. Theyāre YOUR people.
This is generally understood by the authorities, which is why the standard method to get rid of such bandits is to deal with their accomplices (in the very broad sense), the local farmers and shepherds. Rarely with a carrot, often with a stick. States have not hesitated to brutally terrorise, displace, or even exterminate the populations of whole regions to catch the bad bandits, a tactic which on one hand works, and on the other hand fuels the legends more than anything the bandits themselves ever did.
If the bandit is the fellow who tossed you a coin and told you a kind word, and the soldier is the fellow who beat the fuck out of you, chained your brother, and straight up killed your dad, well the banditās your hero now! Even if he wasnāt before. And youāre gonna tell people he was SO generous he have you a whole SACK of coins, yes sir! And he was bold! And strong! And devilishly handsome! And if that filthy coward from the next village hadnāt snitched, heād never ever been caught, he was so smart you see. But he did, and heās dead now, and we made him a song, oh it will break your heart, sir, would you like to hear it?
So if that method worked so well, why was banditry even a thing? Because itās fucking extreme. Itās like setting fire to the house to get rid of the mice: youāll only do that if you truly donāt give a fuck about the house, i.e. the local population. So authorities only resorted to that when the situation was completely unacceptable. Otherwise, they might as well tolerate it, and stick to half-measures. A small gang with limited successes probably wonāt cause a ripple. Itās when you have endemic banditry, or trade routes become unpassable, or people with TOO much wealth and status get targeted, or the legitimacy of the state itself is threatened, that the measures become extreme.
Most of the time, bandits donāt live happily ever after unless
they get a personal amnesty, usually for turning in their companions or straight up bringing their heads
thereās a blanket amnesty after a widespread social unrest which couldnāt be solved any other way
they get co-opted into the state apparatus (as soldiers, irregulars, knights, paramilitary troops whose job is to hunt bandits, etc), and manage to survive all that too, and then get a nice pension / piece of land / reward that sets them up for life (otherwise theyāll become bandits all over again)
If none of that happens, and if they donāt fuck off to another country where no one can find them and start a new life, bandits donāt get to retire. They get caught, jailed, tortured, executed, murdered. Well, there might be a survivor bias here: not WHO survived, but whose STORY survived. If they successfully faded into obscurity, we simply wonāt know about them. For our folk heroes though, thereās only one ending: they get killed.
The Anglo-Saxon Robin Hood
The Anglo-Saxons vs Normans angle seems to be from the 19th century, most notably in Ivanhoe by Walter Scott. It can certainly be argued that it used to be a thing in early oral tradition, and it simply never got written down for obvious reasons. It can also be argued that it was not a thing at all, and weāre only talking about it because the Brothers Grimm started that trend where you take your local folklore, project it far FAR into the past, with or without evidence, and arbitrarily endow it with the Eternal Essence of a Nation. It was all the rage at some point, and Scott surely took it and ran, but by now we hopefully understand why itās a bad take. Nations are made up, they do exist as made-up things, but they do not come with an āessenceā of any kind, and most of the time theyāre much younger than they pretend to be (see: ethnogenesis).
I think that if there were an ethnic angle to the early legend of Robin Hood, something would have survived, even as a refutation. Cover-ups are often obvious, they may hide the dangerous thing, but you can still see the wraps around it, especially if you know what to look for. AFAIK, nobody mentions anything that could be connected to that interpretation in early records. Nothing at all. Itās unclear if people in post-Hastings Britain felt ethnically oppressed by the invaders to a significant degree. When youāre a tenant and have a beef (hah!) with your Lord, is it because he speaks French? Or because heās your Lord? And before he came along, did you vibe with your ruling class? No complaints there? Everything peachy?
So I remain skeptical and unconvinced, but always open to new evidence.
The Sheriff of Nottingham is not a late addition, heās right there in A Geste of Robyn Hode, the very first extant tale, from the late 1400s. Robin Hood kills him.
The good King Richard / bad King John angle is a very late addition. At first weāre not even in that time period, and even when we get there (in a play from c. 1600), Richard is simply the dude who happens to be king, heās not juxtaposed with the evil brother. As for the ransom plot (letās steal from the rich to give to the poor ransom good king Richard!), itās just Hollywood. (AFAIK. Please let me know if youāve found an earlier record, because Iāve looked and came up empty.)