Why dog waive tail when his owner came home?

because it was happy to see the owner