I guess that's true in the US, but in Europe it's mostly a muslim thing. Like half of french prisoners are muslim, some converted in prison to get into these muslim gangs. It's not just self defense like these white gangs(not justifying it but if you don't join one of these you get raped by blacks in some prisons) but a way of making connections.
Of course that's partly the prison fault as they give privilege to muslims like allowing them separate prayer rooms, separate places to eat their halal stuff and so on. Criminals don't care about the religion but they use that to avoid the guards.