The difference between civilian occupations and law enforcement is that cops look for bad. They see everyone with suspicion. It's a conflict, where the occupations you list all participants have essentially the same goal. An interaction as described with cops is not voluntary and both sides have different motivations: to get away as quickly and non-disruptively as possible, vs trying to find evidence of any crime you might have committed.
When you buy something, you have very different motivation than seller does, there's a conflict of interests.
Most people aren't criminals so police should be polite by default. They should be providing an example first, looking for criminals second. Unless they're on the chase of a known criminal, of course.
Unfortunately, these days it is not enforced by anything, so we should take steps to restore those affairs.
Hairdressers, doctors, and baristas operate in a market of free choice. Their motivation to be polite is that customers will go elsewhere if they don't.
Police officers have a monopoly in their industry. If you're being detained, you can't choose to take your business to another police jurisdiction. You're stuck with them no matter how rude they decide to be.
The difference between civilian occupations and law enforcement is that cops look for bad. They see everyone with suspicion. It's a conflict, where the occupations you list all participants have essentially the same goal. An interaction as described with cops is not voluntary and both sides have different motivations: to get away as quickly and non-disruptively as possible, vs trying to find evidence of any crime you might have committed.