The glass in the dormitory is thick enough to hold back the pressure of thousands of gallons of water. Breaking it with a human fist would be physically impossible, let alone breaking it after only five strikes. However, the room is designed as a test with solutions, one of which is breaking that glass. Hence the glass is not designed to safely hold the water, it's designed to barely be able to hold it and be breakable by the recruits.