The only reason this would be caused by pH is if the shop tank had a pH well above 7.6 and your tank's pH is 6.8 or less. Even then, I doubt it is pH, but it could be a contributing factor. But you should find out what the water in the shop tanks is. You need to know their pH and GH as well as your own.
There is either a chemical in your tank water, as mentioned by Byron. Or the fish was recently imported and is suffering from transport stress. Or the fish was chased all over the tank before you bought it. Possibly a combination of these factors.
Most of you have probably read the following link. It is what fish go through to get to the local pet shop.
http://www.fishforums.net/threads/fish-importing-from-the-farm-to-the-home.451553/
If the fish were recently imported and had only been in the shop tank for a day or two, they will have been stressed out due to being caught, bagged, put into different water, etc. If the store doesn't acclimatise new fish when they come in, that makes the problem worse. They might or might not but if they just dumped the guppy back into their tank when you returned it, they might not acclimatise their new shipments of fish.
Then you look at how long the staff member took to catch the particular fish you bought and how long it took to get the fish home.
Did it take a couple of seconds to catch the new guppy or did the staff member chase the fish all over the tank?
If the fish was chased around the tank while it was trying to be caught, that would put more stress on the fish. If it takes more than 30 seconds to catch a fish, tell them not to bother and you will get something else.
If the fish was in the bag for a long time or the water temperature in the bag changed significantly, that would put more stress on the fish.
What season is it there and what is the weather like?
Do you wrap the bag of fish up in a towel or blanket or put it in an esky when taking it home?
---------------------
If you are going to buy new fish, find out when the shop gets them in and buy the fish a week after they have come in. Do not buy new fish that have only just come into the shop in the last few days because they need at least a week to recover from the stress involved in getting to the pet shop.
Try to buy fish at least a week after they come in, or buy them on the day before new fish are brought in. Most shops get new fish in each week so ask the shop when they come in and buy your new fish the day before the new stock comes in. This also helps reduce the chance of diseases being introduced into your tank. The fish have a week to settle into the shop tanks and hopefully any diseases will be identified and treated.
If you want a new fish that has only just come in, ask the shop to hold it for a week. Tell them you are going on holiday for a week (no you don't want any holiday food) and you don't want to add anything new before you leave. Come back a week or so later and get the new fish. The shop might even put the fish in their plant tanks for that week, which is even better.
---------------------
Find out when the shops do water changes and buy fish before they do them, or wait 3 or 4 days after they have done the water changes. If newly imported fish get a big water change within a few days of coming into the shop, it stresses them out. Then if you buy the fish within 24 hours of them being water changed, you take them home and put them in your tank with slightly different water, the stress is too much and the fish die.
Back in the shops I worked at, we did water changes on Tuesday and new fish came in on Wednesday. In situations like this, buy fish on Saturday, Sunday or Monday.