To give credit, like with a business situation, is to give someone time/space to repay later. Let them buy something and they promise to repay you later. If you give me credit for learning Mandarin, it means to give me some leeway, some acknowledgement/ allow me some opportunity to show you what I can do.