What were Pekingese bred for?

What were Pekingese bred for?
Originating in ancient Peking, China, the Pekingese was bred to be a companion to the Chinese aristocracy, who were the only ones allowed to have these dogs. They were reportedly bred to resemble the “foo dog,” a mythical guardian lion in China.