Understand that animals with desired characteristics can be developed by selective breeding.
Lets use cow as an example:
In this case the desired outcome for the cow is the milk yield. The earliest farmers would realise a few cows would be producing 50 ml of milk, while some produces 150 ml of milk, however, most of the cows would be producing 100 ml of milk.
The farmer will collect all the milk but he will only choose to cows which produce 150 ml milk as the breeding cows. In the next generation we find that a few cows are producing 100 ml, a few cows are producing 200 ml and the majority of cows will be producing 150 ml of milk.
He will then select the cows which produce 200 ml milk as the breeding cow. And in the next generation there would be a few cows producing 150 ml of milk, a few producing 250 ml of milk and the majority producing 200 ml of milk.
This shows that the milk yield would be genetic which means that the farmer can select the one with the desired characteristics to breed.