>Have you ever contemplated that the "racist, xenophobic and homophobic" behaviour is what is keeping those communities and used to keep other communities homogenous and thereby ensured high-trust?
Not much, no. A small community that only trusts itself and pushes any out-group away (regardless of disposition) tends to be called a "cult".