I always interpreted it as the gangs having been formed as a means of protection, in part from the evil corporate army trying to destroy them.
It does help somewhat if you watch Bronx Warriors (available from Rifftrax). It’s a blatant ripoff of The Warriors (a classic movie referenced in many riffs), but it’s fun to watch, especially riffed.
In the first movie, the gangs have a stable peace. The Ogre is the capo di tutti capi. He lets each gang run their turf their own way, but enforces rules that maintain order and prevent violence. Ann, who is due to inherit the company when she turns 18 (in just a few days), runs away from home. She’s saved by Trash, leader of The Riders gang, who then has to make his way across the Bronx (through the territories of the other gangs) to see The Ogre. But the company has hired an evil mercenary to retrieve Ann and destabilize the gangs.
Spoilers, most of which you can probably guess, having already seen the sequel
Trash makes it to the Ogre in time, but at great cost. Some of his closest friends in the gang are killed along the way, mainly because his second in command has turned traitor. The Hammer (the evil mercenary) kills the Ogre and turns the gangs against each other, and Ann (who by this point had, of course, fallen in love with Trash) is killed in the crossfire, taking a bullet to save Trash’s life.
It’s actually reasonably well done, for what it is.
This movie picks up in the aftermath of that. What’s left of the gangs have retreated underground. Trash has lost everyone he cares about. And the company is working to destroy his home, which is all he’s got left.
The company has completely dehumanized everyone living there. They’re giving false promises of housing in New Mexico, but no one will say what really happens to the people they deport. Anyone who refuses is killed. Trash’s parents are just sitting quietly at home when the company “disinfestation” squad kicks in the door and burns them with flamethrowers.
So… the gangs were better than company rule, and they’re just trying to defend what’s left of their homes after the company already reduced the place halfway to rubble.
But, no. Neither movie has a happy ending.
ETA: The Wiki article on the first movie has a bit of interesting background.
The idea for the film was first envisioned by producer Fabrizio De Angelis when he missed a subway stop for his Manhattan hotel and ended up in dangerous neighbourhood in the Bronx. De Angelis stated he imagined the idea of a futuristic city where young hoods would fight for their home.[4]
1990: The Bronx Warriors was one of the three science fiction films Enzo G Castellari made with producer Fabrizio De Angelis.[5] These films take influence from Mad Max 2 (1981), The Warriors (1979), and Escape From New York (1981).[5] Castellari changed some of De Angelis’ plot ideas while filming, including incorporating more weird gangs such as the roller skating gang.[4] When discussing 1990: The Bronx Warriors, The New Barbarians and Escape from the Bronx, Castellari stated the three films were written prepared and filmed in six months.[6]
Italian regulations required that 50% of a film had to be shot in Italy.[4] To solve this situation, the film was shot on location in the Bronx with interiors shot in Rome.