The other thing is just that people love credit card rewards.
Obviously, the rewards come out of the cut that the CC processors take from the merchants, so it's not really free, but at this point, if you use debit instead of credit, you're just paying more for no reason. It will take a big momentum shift of stores refusing to accept credit cards before debit takes over in Canada. Even now, I've seen stores who charge 50 cents to use any type of card under a minimum value, whether it's debit or credit. While that encourages cash for small purchases, it does nothing to encourage debit, which would be significantly cheaper for merchants.
I don't think there's any laws against this. What I found specifically says:
I know that historically, Visa and Mastercard have prohibited merchants from charging fees for using a credit card, but couldn't do anything about offering discounts if they didn't use a credit card. I believe they removed that from their merchant agreements a while ago, because it was mostly performative, and I don't think they enforced it very well.