"Why do you suppose Walmart fought the recently passed Maryland bill mandating that it pay 8% of its income to a fund for medical care in Maryland."
Because other businesses are not required to do the same thing.
I can't see the legality in legislation aimed at one company.