Well, first off puppies are essentially infants. Living in a shop window is not an ideal way to learn good manners, proper social skills, or any other quality you might want in your new pet.
Also, in places where the selling of puppies is unregulated, many pet stores get their puppies from unregulated commercial breeders (ie puppy mills). They're poorly bred, prone to genetic issues, and born into crowded, unsanitary conditions.
Even the pet stores that claim to purchase puppies from regulated and certified breeders, are not going to be selling you a top quality dog. Their puppies are often unhealthy and unsocialized, because the breeder is breeding for quantity, not quality.
And think about that, is this really what you want to encourage? Breeding dogs for profit? Factory farming puppies? Just imagine what kind of life your puppy's mother is leading! (I recommend you don't Google it.)
These days, most reputable pet stores will partner with local animal shelters. The puppies in their windows stay for only a couple days, and are rotated frequently, returning to the shelter if they're not adopted. It's the most ethical choice, short of going directly to a shelter.
If you must purchase from a breeder, do your research, and go visit the breeder's home to see with your own eyes see how the dogs are being cared for.