Because the gym itself is set up for mass fitness. Swimming is also a kind of fitness. As long as the gym is big enough to build a swimming pool, swimming classes can be held to let people who like fitness learn to swim. But if the gym is not big enough, you can't run swimming classes. Because the venue is not big enough and there is no swimming pool, I can't learn to swim.