As no PE teachers have ventured an explanation as to why girls and boys were treated in such an insensitive way I will give one of my own.
Enjoyment of PE, leastways at my secondary school, wasn't the prime objective of the lessons as far as I could tell. Their purpose was to toughen us up, make us able to cope with physical discomfort. Hence the rough tackling on a semi-frozen pitch in January, the unheated changing room, and the communal shower. I really do think the point was to make it unpleasant and humiliating in the belief that putting kids through that would toughen them up mentally as well as physically - and if things went really well, encourage us to get our arms and legs blown off in the service of our country.
A couple of my changing-room tormentors at school actually enlisted in the Army. I try not to hope anything bad happened to them.
It wasn't just British schools in recent times that did this: read what George Orwell, Roald Dahl and CS Lewis have to say about their schools in earlier times. They were public schools, but I reckon the postwar expansion of state education imitated them, and this tendency to inflict discomfort on the children has probably died very hard. I'm going to quote this by Orwell about his prep school because it is so ghastly:
If I shut my eyes and say ‘school’, it is of course the physical surroundings that first come back to me: the flat playing field with its cricket pavilion and the little shed by the rifle range, the draughty dormitories, the dusty splintery passages, the square of asphalt in front of the gymnasium, the raw-looking pinewood chaplet at the back. And at almost every point some filthy detail obtrudes itself. For example, there were the pewter bowls out of which we had our porridge. They had overhanging rims, and under the rims there were accumulations of sour porridge, which could be flaked off in long strips. The porridge itself, too, contained more lumps, hairs and unexplained black things than one would have thought possible, unless someone were putting them there on purpose. It was never safe to start on that porridge without investigating it first. And there was the slimy water of the plunge bath — it was twelve or fifteen feet long, the whole school was supposed to go into it every morning, and I doubt whether the water was changed at all frequently — and the always-damp towels with their cheesy smell: and, on occasional visits in the winter, the murky sea-water of the local Baths, which came straight in from the beach and on which I once saw floating a human turd. And the sweaty smell of the changing-room with its greasy basins, and, giving on this, the row of filthy, dilapidated lavatories, which had no fastenings of any kind on the doors, so that whenever you were sitting there someone was sure to come crashing in. It is not easy for me to think of my schooldays without seeming to breathe in a whiff of something cold and evil-smelling — a sort of compound of sweaty stockings, dirty towels, faecal smells blowing along corridors, forks with old food between the prongs, neck-of-mutton stew, and the banging doors of the lavatories and the echoing chamber-pots in the dormitories.
Now this of course is from a male perspective, but it's relevant because PE was developed in boys' schools and only came to girls' schools later by which time the concept was fully formed. It seems to me there wasn't any thought given to how even more humiliating it would be for girls who were taught (and still are taught) that anything relating to their bodies is taboo while by requiring them to parade naked in front of comparative strangers. I am grateful that I never had anything so intrusive as a period check or a bulging sanitary towel. While it is true that involuntary erections can happen to boys, they generally don't happen when you're freezing your bollocks off and know you could get punched at any moment without warning.