Let me help you sort things out here. It is true that Aiello resisted Al Capone's efforts to totally take dominion of Chicago's organized crime during the period between 1924-1929.It is true that Aiello was allied to the Castellamarese crime faction led by Salvatore Maranzano.It is true that Maranzano was seeking to overthrow the Mafiosi led by Giuseppe Masseria between the years 1982-1931 (the period of the Castellamarese War) but mainly in New York.
Now let me sort out the links here.Aiello resisted Al Capone in Chicago but Al Capone won and had Aiello killed. Before he got killed, Aiello helped bankroll the Maranzano war effort which was in New York although Aiello's resistence to Capone was in Chicago.How did Aiello being in New York get mixed up with Maranzano in New York? Capone, Aiello's archenemy was closely allied, through his close and old friendship with Lucky Luciano, to Masseria who was Maranzano's archenemy.
As far as the Castellamarese War was concerned, it started back in 1928 when Masseria demanded bigger tributes from Maranzano and the Castellamarese mafiosi but that they wouldn't budge. Maranzano and his followers initially were technically members within Masseria's mafia family but then they splintered off when Masseria became true greedy.
Back to Aiello in Chicago: Unlike the rebellious Maranzano and his group of Castellamarese Sicilians who once were within Masseria's family but broke off, Aiello never was a subordinate of Al Capone.He was an ally of the Chicago North Side Irish gangsters led first by Dion O'Banion, then Hymie Weiss, and finally by George Bugs Moran. The North Siders in Chicago were on and off at war against Al Capone who led most of the Italian gangsters in the Chicago area.
Moreover, Aiello was a key ally of the North Siders in Chicago because he helped assassinate Pascuale Lolardo who was a Union Siciliane boss, fully Sicilian mafia.Al Capone in his efforts to take total control of organize crime in Chicago needed to have a friendly boss heading the Sicilian Mafia branch there.Capone was not a member of the Mafia because he was, although of Italian descent, Neapolitan and only Sicilian-blooded Italians or Sicilian blooded Italian-Americans would be Mafia members.
Pretty much, everything I wrote above boils down to: the enemy of my enemy is my friend.