Well, as already has been said, many people don't transfer because it is against their corporate policy. There are all kinds of corporate policies that exist, not for any legal reason, but because the corporation thinks it is in the best interest of their corporation. And, not saying this is the case with you, but I'm sure we all know people who think something is "the law", just because it is an individual workplace regulation.
Now you are assuming the pharmacists never break the law. A pharmacist might very well decide to do such a transfer one time, even if they thought it was illegal.
OK, are you referring to laws that a pharmacy can't refuse to transfer to another pharmacy? I could be wrong, but I'm fairly saw these type of laws are state laws, in which case, whether or not he's breaking the law by refusing a transfer depends on what state he is in.