Many municipalities, especially for commercial rest rooms, will not permit wooden floors. You are now experiencing the result of moisture on wooden floors. Open water sources increase humidity. Showers especially vary the amount of humidity in a bathroom. the wood expands and contracts, eventually causing failure.
If you prefer the wood look, make sure it is absolutely isolated from the moisture (and other effluent it can absorb) in the bathroom - or don't use a wood floor - opt for tile where wood is just the sub-floor support to act as a base for the cement board tile foundation.