Ammonia and oxygen deprivation are the two primary culprits. Assuming the bag had plenty of air sealed in it and wasn't completely still, that's probably not the cause though. When fish make waste, it turns into ammonia rather quickly. In a cycled tank, it'll go through the entire nitrogen cycle and pass through safely. In a bag, this isn't the case since there's no biological filtration and the ammonia will hang around. Ammonia can be toxic to fish in pretty much all amounts, so vendors typically purge their fish the day before shipping to cut down on waste and the resulting ammonia build-up. Pretty much 100% of the bag water you get shipped will have some traces of ammonia in it, so that's a big part of the reason more folks are starting to get away from extremely lengthy drip acclimations these days.
With that being said, you mentioned the fish was only in the bag for about an hour, so that really shouldn't be long enough to produce enough waste and ammonia to kill it, unless the water already had ammonia in it. The fish could have also been on its way out regardless and the added stress of transportation put it over the top. The only other thing that would make sense is if Prime or some other ammonia reducer was added to the bag water at any point. Many stores/vendors run copper in their systems, so combining ammonia reducer to copper is extremely toxic.