According to the officers side of the story I am seeing that he approached the officers with his hand in his pocket and refused to take his hand out of his pocket. They had no clue he was in early dementia state and all they had was a call or a man with a gun and would have no way of knowing his mental state.
The next question would be what did he do with that hand in the pocket that precipitated the officers firing. Video, audio or third party credible witness would help clarify the event more.
Yes, they did EXACTLY as trained.
The important thing here is they got to go home, that’s all that matters.