What a hysterical video. The dog dancing with a smile, the man dancing with a smile and the guy on the couch watching them laughing so hard he was crying. What in the world could be wrong with that??
As for the training of an animal to do this, it’s just like any other “trick” you teach them. You figure out a way to show them what you want them to do, either by provoking the action or catching and rewarding them when they stumble onto it by themselves. Then you practice and reinforce it until they will do it on command.
I have a dog that will fall over dead when I point my finger-gun at her and say “bang”. This “trick” came from her tendency to flop down and roll over to get her belly rub whenever I spoke to her.
I have another dog that will smile, grin on command and this came about as a result of her being naughty and doing the grin of her own volition, me liking it, and encouraging her in her “trick”. Now she does it whenever asked and whenever she has been naughty. I call it her ‘get out of jail free card” because I just can’t stay mad at a dog grinning and tossing her head in an “aw shucks” manner.