As far as I know, this is US-specific. For example in Germany, it is very specifically duty of the police to protect the rights of citizens, which includes their right to not be harmed (which also comes from the duty to uphold the law, which is typically being broken when people are harmed).