In your link to 2nd case, the victim was killed by someone other than the lawenforcement, and the police are hunting the killer. There is always someone (sometimes these within law enforcement) crazy and kill others, and most of them got sentence eventally.
But in a reasonable society, we usually can court on the governoment wouldn't use law enforcement to kill people without a reason, and if people do get kill, there will be investigation and documentation of the reason and evidence to support and decision.