Unfortunately, there are quite a few people out there trying to make a quick buck off a dog's life. One problem with pet stores is that they are set up like any other store. They present products in a way that promotes an impulse decision. Remember Rule #1: Never buy, adopt or otherwise acquire a dog on impulse. It's not fair to you or the dog. That said, the quality of the animal depends largely on the quality of the breeder - and there is no shortage of low quality backyard breeders and puppy mills out there. Many of the dogs that originate from these sources are inbred to some extent and will have mild to serious health issues that may not be obvious to you at the time of acquisition. Not to mention the treatment of the animals - both parents and puppies - before they end up at the store for sale. You must never buy a dog from a pet store. Check out sites like prisonersofgreed.org and aspca.org for more information about pet stores and puppy mills.
Please do some research before you get a dog. A reputable breeder will always allow you to visit their facility and view the parents and litter before you select a puppy. If you do buy a dog, make sure you're dealing with a licensed, certified, high quality breeder. Make sure they provide a guarantee and have an acceptable return policy.
Also, don't be offended if the breeder wants you to answer some questions before he or she agrees to let you leave with a dog. This is normal and is a sign that the person you're dealing with is reputable and cares about the animal.
Finally, be sure to do an online search for information about breeder complaints or problems before you buy.