Just because someone's just doing their job that doesn't mean they can't be thanked, especially when their occupation puts them in a much different relationship with the public individually than most others.
Don't really understand that argument (I've never thanked a cop when I had to deal with them though, except for when my friends and I got caught trespassing on a roof and he let us go).
Either way I don't see any major sacrifice they make compared to other jobs other than the things they have to see (especially for those in sex crimes), the stress, and possibility for death or injury in service of others (though plenty of other jobs risk death just in other circumstances).
So saying they don't make any sacrifice is a little too much for me, a lot of jobs do, but plenty of people exaggerate.
Also a lot of this is relative, the relationship and actions of police where I grew up is damn well not going to be the same as it is in Baltimore or New York or something.