Someone on Twitter has made a very good point that there are rules (when it comes to social housing at least) regarding boys and girls sharing bedrooms at home
It is also part of housing legislation. In assessing possible overcrowding:
Section 325 of the Housing Act 1985 provides that there is
overcrowding wherever there are so many people in a house that any
two or more of those persons, being ten or more years old, and of
opposite sexes, not being persons living together as husband and wife, must sleep in the same room.
For these purposes, children under ten may be disregarded and a room means any room normally used as either a bedroom or a living room. A kitchen can be a living room provided it is big enough to accommodate a bed.
When interpreting this definition, a local authority looks at how the
sleeping arrangements within the premises could be organised, rather than how they are organised.
Thus, a couple, with two children of opposite sexes and aged ten years or more, with two living rooms (e.g. bedrooms), may not be statutorily overcrowded because the couple could occupy separate rooms, with one each of the children (of the appropriate sex) .
There is no limit on the number of people of the same sex who can live in the same room under section 325 although there may be a
contravention of the space standard"
House of Commons BRIEFING PAPER
Number 1013, 21 September 2018
Overcrowded housing
(England)
It is noteworthy that Shelter's guidelines have substituted the word 'gender' for 'sex' contrary to the legislation which could have implications:
england.shelter.org.uk/housing_advice/repairs/check_if_your_home_is_overcrowded_by_law