It is always done in prisons and in military service. Socially it is done in sports, but not necessarily in mental sports. It is always done in schools in countries where the religion dictates it. Sex segregation is very unusual at primary school level.