Same with Sam's Club/Costco kind of places. Their margins are below what those credit cards charge out of the gate (except for Discover) but their order volume is so high that they were able to negotiate with at least Visa or Mastercard.
Actually, Costco does NOT take credit cards, with the only exception being Amex.
They will takea Visa/Mastercard Debit card, but you have to enter the PIN. Debit charges are processed at a lower rate, since they're essentially an interface for ACH, and having a valid 4-digit PIN entered (plus buying stuff on a membership card) supposedly eliminates fraud.
(I was there this past weekend to capitalize on their great deals on flat screens.)