There are numerous laws that could cover that, let me play out one possibility for you: There are laws in most local jurisdictions that prevent someone from observing another person in a state of undress. Some of those laws are called "Peeping Tom" laws or something similar. There is also a US Supreme Court Case called Terry v Ohio that allows the police to require that you identify yourself when the police have a reasonable suspicion that you may have already, are currently committing, or may soon commit a crime. Being that this young lady was in a restroom, and there are laws preventing people from looking at other people undressed, she was asked for ID to show she was not breaking the law. The police came there and were there because they were obviously called to report that a male was in the female restroom. Terry v Ohio gave the police the power to ask for ID, the power to detain her, and the power to stop/prevent any potential criminal act (removing her from the restroom in this case).
Look, I support transgender people being able to use the restroom they identify with. I also support equal rights for EVERYONE. However, "social justice" activists, as this girl sure seems to be, do not have the right to flaunt the law by not complying with the law and then expect sympathy from us for her having to face the consequences of her own actions.
So, your question is nothing more than just more of the same misplaced and incorrectly targeted outrage. No one is requiring her to show an ID to use the bathroom. The police obviously responded to a report of a crime being committed (peeping tom, or something similar) and when they asked for simple proof to show she was not breaking that law, she refused and was escorted out. She could have been arrested, but it appears by the little we see in the video that she was not.