Our lab X, Maddy, does this all the time. It is usually an attention-getting tactic. And it works! We're trying to teach her how to shake since she already has this strange habit.