I understand they come from mass breeding rodent farms.
You must remember though that even though they are bred there they only spend a tiny part of their lives there. Half of that they aware of nothing much as they are in the nest with mum. The only reason they are not tame is because they have never been handled or seen a human really till they reach the pet store. In the stores they are usually from around 6 weeks of age and they don't tend to stay there that long. Conditions in a store are usually good and if anything is lacking you can draw this to the attention of the manager.
Generally with pet stores, some order from rodent farms, some breed their own stock and some get babies from hobby breeders.
Their lives are what you make them when they come to you. When they find you they are no longer a poor little rodent farm hammy but they are a part of your family and whatever life throws at them you will see them right