You are so correct that it depends on the department.
I should say, it depends on the leadership.
When my family moved from TX to AZ the difference was night and day. In AZ when you see a cop car, you wave and they wave back. You know you’re safe. In TX, when you see a cop car, you stare straight ahead and pray that they didn’t target you. If they did, you’re about to get searched.
Yes, I met some great guys in TX who worked for the county. But the city cops were horrible. (I thought one guy was a good guy until he started targeting my daughter to search ‘for easy fun’. He flat-out said, “Do you know why I always get you, honey? Because I know that you’re not going to give me any trouble.” She casually threatened a lawsuit and the searches stopped.)
My wife had a cop on Mercer Island in Washington stop her every time she passed him. He would berate her and say all sorts of insulting things. When I called and talked to the dispatchers to complain they laughed about it and said he was a really nice guy. I finally called the chief directly and the harassment stopped, but later we saw that he had another woman who looked very similar to my wife pulled over.
So I do not deny that there are bad cops and probably bad departments. Fortunately, the police that I worked with were good guys and the department was run by a strong leader who let them know exactly how he expected citizens to be treated. His officers respected him and for the most part followed his wishes.