My best guess is that it's related to a 1985 California law prohibiting credit card surcharges, which has been subject to court challenge:
https://oag.ca.gov/consumers/general...ard-surcharges
Perhaps they first imposed the fee on credit and debit card purchases, then decided to backtrack on credit card purchases because of uncertainty surrounding the law by effectively refunding the fee.
Note that setting out the fee like that insures, at least in the case of debit card purchases, that it's not subject to California sales tax:
Regulation 1643