That's true for anyone facing the same situation. Under California law, if you shot an unarmed person in your back yard, even if they were trespassing, then you would be facing charges. Why should police be held to a different standard?
Police are representatives of the community who are forced into dangerous circumstances because of their training and experience to confront these situations in ways the average citizen may not be adequately equipped for in hopes the results of the confrontation will end peacefully and lawfully. This, unfortunately, does not always happen.
Any police-involved shooting is followed by investigation and some are indeed prosecuted for their actions. In Texas, where I live, shooting someone on your own property will be investigated but it may not always lead to charges or conviction.