In the past three decades in high‐income countries, female students have outperformed male students in most indicators of educational attainment. However, the underrepresentation of girls and women in science courses and careers, especially in physics, computer sciences, and engineering, remains persistent. What is often neglected by the vast existing literature is the role that schools, as social institutions, play in maintaining or eliminating such gender gaps. This explorative case study research compares two high schools in Israel: one Hebrew‐speaking state school that serves mostly middleclass students and exhibits a typical gender gap in physics and computer science; the other, an Arabic‐speaking state school located in a Bedouin town that serves mostly students from a lower socioeconomic background. In the Arabic‐speaking school over 50% of the students in the advanced physics and computer science classes are females. The study aims to explain this seemingly counterintuitive gender pattern with respect to participation in physics and computer science. A comparison of school policies regarding sorting and choice reveals that the two schools employ very different policies that might explain the different patterns of participation. The Hebrew‐speaking school prioritizes self‐fulfillment and “free‐choice,” while in the Arabic‐speaking school, staff are much more active in sorting and assigning students to different curricular programs. The qualitative analysis suggests that in the case of the Arabic‐speaking school the intersection between traditional and collectivist society and neoliberal pressures in the form of raising achievement benchmarks contributes to the reversal of the gender gap in physics and computer science courses.