When the cops tell me to do something, I comply.
If I don't like it, then I tell the judge.
The kid didn't comply, so now he can tell the judge why.
The cops are OK. Probably followed proceedure with an unruly person that refused to comply.
Yelling Jesus isn't a free password to disturb the peace.