Preconditioning before asking a favor
The effect you ask about could very well be seen as an example of the Ben Franklin effect, also known as the foot-in-the-door phenomenon.
In your example, replying to the question "Do you have a charger?" would be interpreted as a small favor which is then followed by the bigger favor of lending the item.

Reference:

Beaman, A. L., Cole, C. M., Preston, M., Klentz, B., &amp; Steblay, N. M. (1983). Fifteen Years of Foot-in-the Door Research. Personality and Social Psychology Bulletin, 9(2), 181-196.DOI: 10.1177/0146167283092002