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 asked them about the latter issue, and they said that it might get fixed next year; but there are years-old Google Reviews of the gym citing this promise!
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.