um, the car was stopped and driver was committing a violation.
You made the general statement => “Police can ask for ID if you are operating a motor vehicle. You did not specify in the case of a violation
They can’t just stop you and ask for ID willy-nilly just because you’re operating a vehicle.