Not getting out of the car when directed to by the police can be dangerous...
The cop, IMHO, used great restraint by just punching him instead of pistol-whipping or tasing him...
Yes, he disobeyed a lawful order to exit the car. At that point the reason for the stop became irrelevant.
But there was no reason for the punch. That appeared to be frustration and unnecessary.