Spanking a 2yo is reprehensible!
First, the dad overreacted to a child that wasn't really doing anything wrong...whining/whimpering isn't misbehaving, just annoying to the parent. It's not like she was throwing a full blown temper tantrum (which is also typical behavior for her age)
Second, a 2yo doesn't understand threats. Their reality is very concrete so hypotheticals don't work w/ them. Just like time out or delayed consequences don't work w/ them... they just aren't developmentally ready to understand and internalize these things.
If the father really wanted the child to change her behavior, one the the best ways at that age is distraction. No you cannot have mommy's purse, but here is a..... toy/board book/car/doll/sticker book/cool pamphlet w/ pictures of kids I found for free in the dr.'s office. Done before the whining/whimpering starts...it goes a long way.
In response to the parent who "spanked" their two year old at the store for having a temper tantrum. It is fairly well documented that the best way to stop that kind of behavior is to remove the child from the situation and leave...even if that means leaving your grocery shopping. Another way to get around the temper tantrum in the store is to only go when the child is well fed and rested...and use distraction BEFORE the tantrum starts.
Sure my two kids (6yo & almost 2yo) have times when they are stubborn (they get it from mom!

) but I have yet to deal w/ a full blown tantrum out in public... they just don't happen. Sure they have gotten whiney...but nothing more. I have never raised a hand to either of them and they are both extremely well behaved (age appropriately)...in fact we receive compliments about their excellent behavior all the time!
To the OP... I think I would have intervened w/ the dr's office. Yes you did witness abuse. The yanking around/yelling was bad enough but even though the spanking happened in the hall, it was obvious that it occured.
At this point, I would follow up w/ the dr's office and see if you can report the incident after the fact. That little girl needs someone to intercede on her behalf.