Human beings became the master of dogs. How?

Human beings finally became the master of dogs as they were stronger than anyone else on Earth. It is also true that even lions were afraid of them. So, dogs joined the man and stayed with him to become his servant and served him faithfully.