You are not allowed to swim in an onsen. The bathroom floor is slippery so you need to be careful. Most importantly, no one swims in an onsen means you don’t have to wear swimmers.