I agree respect has to be earned, but that's different than saying obeying authority is optional in that situation. It is not.
I wonder though, if part of what happened was a cultural clash. The school is in a middle class district as a whole, but the student population may not be, demographically. Or, may be but the girl was new and may have come from a different environment altogether.
I've spoken many times with an acquaintance who is a cop in the very violent city where I live. I've been amazed by what he's said about the culture he must deal with successfully to stay alive and to not use force unnecessarily.
Example. He's about to arrest a 20 something black youth for (robbery or home invasion or drug dealing or discharging a gun unlawfully). What the kid cares most about at that moment is not the fact he's about to be arrested, but that the cop treats him with respect. That the cop doesn't diss him. He can arrest him, put on the cuffs, haul him away, but all hell will break loose if the cop insults him or doesn't abide by the street definition of respect.
Maybe, just as a perhaps, the stakes for the girl weren't about the phone or detention or anything other than her perception she wasn't being treated with the respect she felt she was owed.