While floating that bag did you at any time add any of the tank water to it? How much at a time if you did?
It sounds more like pH shock than anything else, combined with the general stress of being moved and possible ammonia spike due to the number of fish added all at once. Its very unlikely that only 1 specific thing caused your problem, but rather a combination of things.
When you get the next new fish home, keep the number of them minimal, during acclimation be sure to add a small amount of water to the bag every few minutes (a few tbsp at a time), but before you even begin your acclimation, test pH in both the tank and the bag so you know what the differences are, if any.
If you don't have test kits of your own at home I would strongly urge you to get them before buying more fish for your tank. That is the only way you're going to have the answers you need to properly acclimate the fish to your tank. Be sure to work with liquid test kits, don't waste your money on the strip tests, they're mostly useless because they are known for their inaccuracy. Being accurate is vital to success.
If the pH in the bag is more than .2 difference from whats in the tank then continue the acclimation for up to 45 - 60 minutes (the bigger the difference the longer the acclimation) and reduce the amount of water added each time to 1 - 2 tbsp.
One other question... did any of the water from the bag get into your tank? If it did, be aware that all of the waste (ammonia) in the bag would then be going into your tank, along with any disease/illness problems that may be in the store tanks. The fish should be carefully netted out of the bag and released into the tank and the bag water should get thrown out.