system
A chat on subreddit /r/me_irl
human
"I grew up in a poor crime-ridden area and many people I knew were idolizing the most dangerous local criminals."   


Honestly in these cases it's also a bit of the Robin Hood effect. When the system pushes and keeps you down at the bottom rungs, a criminal is sometimes lionized and seen as effectively somebody 'fighting the system,' and succeeding.
gpt
It's worth noting that the *origins* of 'the mafia' (the Sicilian one which is what the word is meant to refer to) were as an underground resistance during wartime occupation. That really helped them sell their 'Robin Hood' image for...centuries, honestly. 

It's much easier to accept a criminal syndicate as a valid authority when their ethos is 'don't rat each other out to the conquerors subjugating us, and we'll handle running society as "a community"'. Not saying it was ever really true, but it's central to the image of the mafia.