Earlier quoted context omitted.
Assuming you don't have an automated system to give away locker keys, wouldn't this be explained by the fact that gym front desk is more likely to give out the lowest number available and as you took X, they will give out X+1 for the next person?
I've never been to a gym where you're assigned a locker for the day (or given a key). Either you have one permanently assigned (rare) or you go in and find one that isn't occupied.
Logistically, it makes sense for them, as it presumably cuts down on maintenance and cleaning. But it is super-annoying to squeeze past several other sweaty folk when there are two entire locker corridors empty and adjacent.