Nowadays, banks are basically commercial banks, and they have the right to freely price profits. As long as their interest-bearing profits are within the range and scope stipulated by the state, they are legal.
Moreover, the credit card itself is a special kind of commodity consumption. As long as you can repay within the credit period, there will be no loss. If not, why use this payment method?