I am glad you are able to return it. To answer you, there could have been any number of things going on including bad breeding, internal parasites, other diseases, and/or ammonia poisoning. In cases like that, it is good to try and get a sick looking away fish away from the healthy fish as soon as possible. There is no way to say for sure what the issue was at this point, so just keep a close eye on your remaining fish and try to be careful about picking out a new fish that has good looking fins and a plump belly. Try looking at mollies on google images to see what a healthy one should look like. That way, you can get a good idea of what to look for.