Police shooting your accomplice in an armed robbery is certainly a foreseeable consequences of armed robbery.
I don’t understand why that is being equated with murder though. If I would have forced my accomplice into the life threatening situation that got them killed, sure, I would be guilty of their death; but if we assume that they went along willingly how can I get blamed that they got themselves in the situation where (someone else!) killed them?
That’s the law, but is is actually just?