That was due to the Allied Military post-WW2 occupation of Italy. There are a couple of books on that very subject. These Mafioso presented themselves as anti-fascist and anti-communist to help their appointment into positions of power.
lots of Mafia in the USA placed in positions of authority in labor unions -- see Teamsters. Some US political thinking was to use these harsh, often effective people as a "lesser evil" versus genuine communist-labor organizers. Due to many abuses of workers (see History of Slave or Indentured Labor) there were many communist labor organizers, for real.