True. I never once saw it as shooting Reg. As you said, in the context of that moment, it made zero sense.
I felt it was good to describe exactly how it was actually not at all left vague, the way it actually was shot was definitive in its action, the exact opposite of ambiguous.
I was at first thinking that he could have shot Reg or Pete and they purposely left you guessing. However I had a chance to re-watch the ending.
When Abraham takes down Pete he actually puts his hand on the top of Pete's head and presses Pete's head into the ground. This is why I kind of thought it would have been hard for Rick to shoot Pete in the head. Also since Abraham was right on top of Pete I thought he would not have shot unless Abraham moved which they did not show.
Also I thought he could have shot Reg since Reg did die in Deanna's arms. If you watch the scene he dies, so Deanna asking Rick to kill Reg before he turns into a zombie would be the right thing to do and totally appropriate in that situation.
However when you watch the end you see Rick looking straight at Deanna, right in her eyes. Reg is right there, her and Deanna are almost face to face. When Deanna says "Do it" Rick totally turns his body away from Deanna and points his gun in the other direction. He had to have shot Pete.
That is why I was joking earlier that I kind of wonder if Deanna meant kill Reg before he turns into a zombie or if "Do it" actually meant kill Pete. Maybe Deanna wants the best of both worlds. Maybe she knew Pete had to go so she wanted Rick to kill him. She now can actually claim Rick killed Pete on his own and not by her order. She can just claim that she wanted Rick to shoot Reg before he turned to a zombie. That way the people still can trust her as being the good one and that Rick is evil and cannot be trusted and should not take over as the leader.