The issue doesn't change from airline to airline. The reason why is similar to most other standard procedures during takeoff and landing. They are the two most (relatively) dangerous times of the flight. Passengers must remain in their seats and with a clear, unobstructed escape route.

In the event that a pilot must perform a hard landing, nobody would want to be trapped in the toilet. There aren't any safety features in the lavatory (like a seatbelt) that would keep a passenger in place. However, there are many potentially painful sharp edges. In the event of an emergency evacuation, a passenger could also become trapped in the restroom and unable to escape.

According to Gizmodo, one of the more gruesome reasons the "takeoff toilet" is banned is that in the event of a fiery, fatal landing, emergency response teams can identify bodies based on seating charts.

The one loophole that passengers may have is a 2010 ruling from the Department of Transportation stating that during a tarmac delay, airline crew must make the toilet available to passengers. But as soon as the plane enters an active taxiway, everyone must remain in their seats.