He still has a duty as an officer to let her know the law. She shouldn't be riding her bike on the sidewalk. Plain and simple. If she wouldn't have gone all ghetto on him, he may have just said "please ride on the street or walk your bike on the sidewalk"
I've had cops give me TONS of crap over riding my bike. Hell I had a cop "pull me over" once while carrying my bike on a sidewalk sideways (across my back) and said I was taking up too much space on the sidewalk and people could not get around me easily. Was I mad? You bet. Did I do what I was asked, yep. Whats the point of fighting the situation?
If he really wanted to be a dick he could have given her a ticket for improper safety equipment (no flashing lights, no front light, etc). Hell in my township you have to have a license on your bike (a small flexi band with a number on it) and you can be given a 25 dollar ticket for not having it.
The cop didn't make those rules, he is just enforcing them.