I'll make a call on what is causing this...frustration with impulse control! He knows what is right, but has difficulty controlling himself still.
My son did the same thing. (reiterating his bad behavior as he cried over it).
Another thought: If your child is very self-aware, he may be embarrassed to be reprimanded in front of other people. I once read that a parent, who for instance, has an "issue" arise with her child when his friends are over, should take him aside privately to talk it over. In other words, help them to "save face".
Another example: My son used to say things to me that made me cry. My husband went in and had a private conversation with him on how he hurt me with his "choice of words", and suggested other things to say to get his point across without hurting feelings.
Possibly, you could give your child other ideas to get his feelings across without hitting. Maybe something as simple as having him actually say "I'm angry!" or "I want more!". Then give him lots of positive feedback for using his "words" and not hitting.
BTW...I always try to give my son something to look forward to. If I tell him story time is over, I will tell him tomorrow night he can have two books. Or if I tell him he can't have a cookie now, I will give him an exact time he can.
I found that helped him a lot, and shut down the tantrum quickly.