Laws may vary by state, but here in California as with many other states, the law is 4 months of age is the age limit to be housed and kept by the pet store. If they do not move the puppy by 4 months of age, they must dispose of it.
How they do this is up to the store...the industry standard however is to sell the puppy back to the broker - the brokers are the ones who are arranging the purchase between the puppymill or backyard breeder and the store. Most pet stores pay between 100-300 for the puppies to the broker, and then sell for 600-3500 in stores depending on breed. Most broker/store contracts establish the buy back clause. If the pet store sells the puppy back, then the puppy goes back to the puppymill and becomes a breeding dog. As long as the dog can produce and crank out a minimum number of puppies, this will be his or her life. Euthanizing by the pet store is very rare because the only goal of the pet store is to make their money - they will always sell the puppy back to recoup their money - but brokers or mills may ultimately destroy the animal.
As an aside - the 4 month age law is why falsification of birthdates is the norm in petstores. Gullible people love to believe they know their pups birthdate when purchased at the store - odds are they don't. If you ever see a puppy in the window that looks a lot smaller, or a lot younger, than the posted age, this is why. Most backdate the age so they can ship earlier (law requires puppies be 8 weeks old before shipping) and have more time in the store for potential sale. So 5-6 weeks old is common. Most used to just backdate the birthdate to whatever typical Monday shipping date they planned to ship on - but the USDA started to get wise to every puppymill puppy's birthdate falling on a Monday...so they are varying this more now.