The person who has money and is happy to give it to the other person for a short period of time is the lender, so he lends money.
Remember this sentence: I need to borrow some money.
It is unlikely that a person who already has money will feel it is necessary to give that money to someone else for a short period of time. However, "I need..." shows that the person lacks something (in this case, money) and therefore needs to "borrow" it from someone else.
Student or Learner