I think it does matter, if the decision had been made by Walmart itself I think they would have stood on stronger ground.
Are you sure Walmart owns the pharmacy? A few years ago in the Houston area, Walmart sub-let the pharmacy space to a company that provided the service. If so, then it would be individual companies deciding what they would stock in each different area. Is that the case here? The coffers wouldn't be as full though.
Until recently that was not the case. Pharmacists take an oath, not unlike the Hippocratic oath, to do no harm. Employers, almost to a one, understand that the oath supersedes any employment contract and allow them to decline based on their interpretation of the oath.
This oath is going down and it will not be long before all doctors are required to perform abortions, even if they think they do harm.
After all, it's just an oath, certainly not anything that might interfere with the desire of the almighty state or the right in the constitution to kill babies.