They have immunity in cases where it is the public interest that they do so.
This can be read in "many" ways, the most obvious are speeding to an emergency or kicking a door in when they think someone inside may be in danger or injured.
By the same token, parking on double yellows/zigzags/disabled bays (I have pictures of one parked in there, took it as thought it was funny) depends on how you read the situation: to get to somewhere where a crime is being committed, understandable. To go into a shop to "collect" a shoplifter, makes life easier but not essential. To go into a shop for refreshment (doughnuts) and not be too far away from the car in case of a call, a bit weak, but you know any complaint will come to nothing if that is used as an excuse.
It's annoying when they get away with it and you don't, but sometimes you just have to say s*d it, life's too short to worry about it, and move on.
One thing to remember, if you make a HUGE fuss over it, what would happen? If they're guilty, so are you, whatever happens your fine wont go away, so from your point of view there is no benefit/advantage or plus side.