The bathroom is for customers only, so it is kept locked during operating hours. But it is inconvenient for customers to ask the employees for the key, so when the bathroom is not occupied the door is kept slightly ajar so it does not lock.
We need a word for when a system evolves in such a way as to entirely defeat its own purpose, but perseveres anyway.