I don't know, it depends on context and intent, like nearly all things. But this is put aside because most on HN immediately go: police == bad.
If the cop is illegally parked to get lunch, sure ticket them, and/or report them for discipline.
If the cop is attending an incident and that is the only place to park within a reasonable distance, then that's fine.
However the suggestion that irrespective of context and intent, and even for the first contrived example, the cop should lose their job and pension... Ridiculous.