Imagine if the DA went around saying, "we need to have a key to your bathroom door." With a bathroom door it sounds hilarious, but that's basically what he's saying.
I believe you're looking for Section 1008.1.9.5.1 of the International Building Code:
Closet and bathroom doors in Group R-4 occupancies.
In Group R-4 occupancies, closet doors that latch in the closed position shall be openable from inside the closet, and bathroom doors that latch in the closed position shall be capable of being unlocked from the ingress side.