Mantises are not truly communal--all species will cannibalize if given reason and the opportunity. Some species are simply more tolerant of one another than others and less likely to prey on their own kind or attack them to get them out of their perceived territory. These tolerant species will all cannibalize if they become hungry enough and there is a target they can take down without much risk to themselves. For ghosts, it's always recommended to separate the sexes when they are nymphs so you don't have the larger females eating the males. You'll find that communal mantises are most likely to cannibalize one another when the victim is molting or if the victim is smaller in size. Molting mantises are a prime opportunity because they're unable to defend themselves if they are attacked and smaller mantises are less likely to put up a fight.
A given amount of territory can naturally only support so many predators of any kind and unless the animals are pack hunters, it is unlikely you will see predatory organisms group up unless out of biological necessity or it is a location rich in food and resources. Most mantises are naturally aggressive and cannibalistic because there's only so many opportunities for food at any one location. Fighting off the competition improves their chances of getting food, but eating the competition is even better in terms of adaptive behavior. It is further more adaptive to fight off or eat competition when there is no risk to themselves in doing so.