It’s not about legality. It’s about compliance.
If you become a target, they will arrest you and drop charges later. They will make you miss work and lose your job. They will set up surveillance on you to catch you doing anything else they want to continue harassment.
You don’t have to look hard to see reporting of officers using official databases to settle personal scores. 404 media just did a big expose on ALPR Flock DB abuses