Typical. Cops tend to either think they're above the law or that they are the law. Just like judges think they make the law. Got news for both, their jobs are to enforce the law.
Unless it's legal in Vegas for anybody to park their bike on a sidewalk, which I doubt, then he was breaking the law. He also broke the law when he refused to give his badge ID. Police work for the public and anybody has the right to ask for their ID when they are on duty.
However, the police have no right to demand ID of a citizen unless that citizen is suspected of something. Cop was being an @ss asking the kid for ID. Then he tried to accuse the kid of loitering.
Loitering laws are a joke. The original meaning of loitering was to hang around a public place waiting to commit a crime. Like waiting for a shop to close before you break in, or waiting for customers to sell drugs too. Pretty hard to charge somebody with loitering before they commit a crime, because until they do, you can't really know that's their intention. But now of course they call it loitering simply because you're hanging out someplace and they, the cops, don't like it. You're sitting in the shade reading a book, or asking a cop "why are you breaking the law?" and suddenly you're a criminal.
I hope the kids parents turned that over to that police force and demanded reprimands to that cop for refusing to give his badge number on request.