Gender has nothing to do with limiting what children can carry, or conceal, coming and going from the school building.
In Pakistan the gender segregation is almost certainly a religious thing given Islam is the religion of 96% of the country. Segregation by gender is also found in masjids/mosques, this is a normal part of Islamic culture.
Comparing a religious custom in a predominately Islamic country to clear backpacks in American schools is wholly irrelevant.
The point was they’re not trusted to goof off between classes unsupervised - that fraternization is the motivation is secondary. Also thanks for lazily generalizing about Islamic countries