She had mental health problems.
The video camera in the library where I used to work caught one of our patrons doing this once.
There were plenty of bathrooms in the building available to her.
Instead, she felt a compulsion to pee in the elevator.
At least that's what we learned when we called the cops after she did this a few more times.
People often poop in libraries too.
It's an interesting world.