There are so many possibilities that it is hard to nail down one reason why the fish unexpectedly died. I don't think I would attribute it to acclimation. Could be, but not my first guess.
Sometimes you get a fish that has a weakened immune system from previous shipping/transport. Then you pop him in a new tank after acclimation and whammo.....the nail in the coffin. A virus or disease gets the better of him and he is gone.
I personally only buy fish that I am certain of health. I will give you an example. I have a local fish guy that had 2 fourspot butterfly in his tanks. I hadn't adding anything in a year to my display. I watched these fish over the course of three visits and a solid month--I put a deposit on one. After a month of watching them, I was sure they were strong. They were Hawaiian and at the point that they were constantly searching for food. The minute a pellet hit the water, they were on it like their butts were on fire. That's what I look for in a candidate for my tank. Mystery fish on a whim have cost me a lot of money in the past. I know it's tough, but the best way you can assure success is to have an LFS
that will work with you to take the time and make sure you are getting healthy, clean, and strong fish.