Some fish don't take well to a new home. That's the breaks. But more than likely, there is something about its new home it doesn't find good:
Water quality.
How does your water chemistries compare to the the LFS water?
Is you water quality tops?
How old is your tank? i.e., has it become properly seasoned? (Butterflyfishes should not be put into aquariums, IMHO until the aquarium has been up and running at least 6 months after the nitrites and ammonia levels have all gone to "0").
What are your nitrates? Butterflyfishes can go off their feed from major shifts in nitrates, in my experience.
Does your LFS put copper or other medications in their water?
Tank mates.
Being bothered by something in the tank.
Acclimation.
Bad acclimation experience or acclimation not done properly.
Stress.
Almost any source in addition to the above. Stress does not have to be your doing, but could have occurred days or weeks earlier. Some stress can be the size of the tank. Is your tank large enough? What size is the fish?
Disease.
The fact the LFS had it for a couple of weeks doesn't mean it was free of disease or a condition. That is why many LFSs put medication in their tanks --- keep the fish alive just long enough to sell the fish.
QT
Was the fish properly quarantined before it was put into the display?
As you can see from the above 'tip of the iceberg,' the possibilities are numerous.