German Shepherds were originally bred in Germany in the late 1800s to be herding dogs, with the goal of standardizing dog breeds to preserve the best traits that assisted in their job of herding sheep. They were bred specifically for their intelligence, strength, speed, endurance, and a strong sense of smell. The breed was developed by Max von Stephanitz, who valued mental stability, intelligence, and temperament above aesthetics. He aimed to create a perfect working dog, and the German Shepherd Dog was bred extremely specifically with regard to the exact function of every element of the dog, from gait to attitude. German Shepherds were also used for protecting flocks from predators.
Today, German Shepherds are still used as working dogs, and are known for being easy to train and good for performing tasks and following instructions. They are especially well known for their police work, being used for tracking criminals, patrolling troubled areas, and detection and holding of suspects. Additionally, thousands of German Shepherds have been used by the military. They are also used in a wide variety of scent-work roles, such as search and rescue, cadaver searching, narcotics detection, explosives detection, accelerant detection, and mine detection dog, among others. German Shepherds are still used for herding and tending sheep grazing in meadows next to gardens and crop fields, and are expected to patrol the boundaries to keep sheep from trespassing and damaging the crops.