Think of it this way....
Form follows function is a popular saying in breeders here.
So you select and breed for a purpose by choosing the dogs that excel at the job, in the environments they work in, and over time the dogs appearance comes to reflect both the environment and the dogs purpose.
So the breeds we have today were formed.
There was nothing artificial in that selection process, Domestic Dogs natural environment, was its Human environment and the usual laws governing selection of a species were in place.
Then came the Kennel and sporting groups, who set out breed standards and preferred traits. Form, or 'states' of being to qualify breeds and jobs. Those 'forms' now qualify eligibility to breed and working status. And function does NOT follow form.
Qualification is a reductive measure, and dogs are seldom selected for ability of response to the environments and purpose they are supposedly bred for, but for the form they qualify.