The primary reason these limits exist are normally due to fire code. The local fire department basically determines what it deems is safe in terms of the number of people exiting a room, hallway, staircase, etc, and passes that along to the hotel, which incorporates it into their policy.