why is there an additional charge of 2.5% if I swipe my card at your store? No other store charges extra? Isn't it illegal?

Generally, Vendors Add Card Swipe Charges to The Price They Sell Products at. In Such a Case, Factually, You Pay Swipe Charge, Every time You Buy !! Regardless of You Remitting Cash or something else but Card. Most of them will Sell at M.R.P. so they have enough Cushion to absorb Card Charge.

When You know that you are Charged when You Swipe, You Can Save it by choosing other free payment options like UPI or google pay.

It makes a Big Saving particularly When the Bill Value goes in Lacs. The Benefit when it is Charged Transparently is that for Small Values, You don't mind paying x percentage extra and Save the same when it matters.