Puppy farms exist to churn out a profit at the expense of the dogs themselves. To breed a litter well is expensive and time consuming- a labour of love.
Ideally you only breed from a bitch who is a good example of her breed and true to type- i.e. Meets the breed standards in terms of temperament, looks and drive. The breeder should know her lines well, their weaknesses and plus points and put her to a dog who compliments this. Doing this you hopefully breed puppies that you can expect to behave in line with breed traits and look as expected. To find out if your bitch is a good example you require others to judge her, that can be in terms of showing or working, or in whatever discipline it is you have in mind, eg agility- but there is a clear purpose you are aiming for.
You need to ensure that both parents and their lines are healthy. You do this in several ways. You can have hips and elbows X-rayed and scored. This increases the likelihood that puppies produced will have good joints an unlikely to develop dysplasia/arthritis and need surgery. Again knowing the lines and 'family' scores help you build up a picture as to whether your bitch should pass on good hips/elbows.
There are genetic conditions that can be screened for by DNA testing. For eg in my breed you can screen for PRA which in affected dogs can cause blindness by 3. Both parents could be perfectly healthy genetic carriers and you would never know without testing until it was too late.
You chose a stud that compliments your bitch in terms of her failings, and ensure he is as healthy as possible too with the health tests as recognised for each breed. The stud that suits may well be the other end of the country.
To make sure you travel at the right time many owners have their bitch hormone tested. Many have her scanned during pg too.
That's before puppies even hit the ground.
They and their mum require constant care and the very best food etc to give them the best start possible.
Many, but not all, good, ethical breeders are also members of the kennel club ABS scheme to try and help people differentiate between puppy farms, back yard breeders and those doing it well.
None of the above is cheap.