Learning to swim and being able to do X distance (I think it is 10m) is part of the national curriculum.
I used to accompany the school swim run, 180 children divided over 3 sessions. They get 30 mins each.
They use a "baby pool" which just means a separate pool which is one depth all the way across because some children have never even been swimming. The main pool is divided into lanes, deep to shallow end for those who can swim. The baby pool is used for water confidence and because they can only have so many children in the main lane pool at once.
Re letting other people in, there is a safeguarding issue. This isn't the library, these children get naked. We even have to make sure there is no one in the toilets before we allow a child in.
They use the main communal changing rooms which are rooms and they also use cubicles depending on their year group. We have to have a male teacher who can enter the boys changing room if needed.
So, it is a huge money earner for the leisure centre. Year in year out, my son's school swims there.
I also faced the same issue wanting to swim when it was convenient for me and not when the pool dictated so I joined a private gym. As we go swimming as a family every week it worked out cheaper to do this than pay for swimming at the local leisure centre.
For what it is worth, both my local pool and the private gym have a baby session.