Technically the commercial bank lends to the central bank. That's why they receive interest on it.
That's just a loan like all the other loans on the asset side. The difference is that the interest rate is set by the borrower not the lender.
Holding a deposit is just different name for a particular type of loan.