Debit networks (oversimplification) are basically ATM networks where your bank gets a note saying “user” supplied their card and pin to authorize a withdrawal of $X. This is why you can also pull out extra cash on these transactions. Banks ofc want to be reimbursed for the onerous task of giving you your own money, so they usually charge a consumer-facing fee for these transactions.
Credit (really Visa/Mastercard) transactions tell the bank “user” gave us their card and a signature, our fraud algorithms tell us this is probably fine, and we’ll settle this payment in bulk with the rest of your users’ purchases in 1-3 days. Banks, again wanting their cut, are paid via merchant-facing fees (interchange and merchant discount rate).
Stores keep the debit option up because some people like to draw extra cash and they get the benefit of not paying the fee even though their prices already incorporate the cost of credit card processing.
That is also why all the “financial advice” sites say to run things as credit, but honestly I’m not sure how current the above is given recent regulations.