Opening the door with a gun in plain view is normally to scare off whoever is at the door. But I doubt the police had guns drawn at the door, waiting for this man to open up. They probably had their hand on the gun, with holster unlocked and ready to draw. The deputy who fired the round that killed the man has been placed on leave.
And they don't have to announce themselves for knocking on a door. They can knock just like you and me, and wait for a person to open before saying anything. What is the point of yelling out "Police, open up!" at 0130? Likely it will wake multiple other residents in the complex, and stir up too much commotion. Safety reasons that don't necessarily pertain to a homicidal man on the other side of the door, but an entire complex full of people coming outside to see what is going on, when there is possibly a homicidal man in the area? Great plan. Bring everyone outside with someone who might be crazy enough to take someone hostage and shoot a few people.
Personally, if someone is at my door that early, I come to the door and ask "Who is it?" before even cracking the door. (That is probably when they would've quietly announced who they were, to reduce the possibility of putting civilians at risk.) And when I do, there's a nice steel hook that will only allow the door to open 5 inches or so, if I do not move it out of the way.