Why are toilet door lock indicators this way around?

Why do the colors on a toilet door display the opposite to the principles used in engineering UI's such as power stations?

For example, a screen full of red dots is a good thing as the color shows the current state of the system. Red = alarm not active = no errors. Green = alarm active = errors.

Following this logic on a toilet door they would be Green = active = do not enter. Red = not active = enter.

Yet this appears to be the opposite. Red = active/occupied = do not enter. Green = not active/occupied = do enter.

enter image description here

The only thing I can think of is they use coloration similar to a traffic light system. Green = go. Red = stop.

Does anyone have any insight as to why they are opposite yet both are showing the current state of the system?