The first 1963 four part story "An unearthly child" has the Time Lord, his grandchild and two of her teachers back in caveman days. Two factions are in conflict over the secret of fire. Ian is showing one bunch how to rub some sticks together but the Doctor walks past, leans down and strikes a match to the kindling. A quote ensues - " he makes fire come from his fingers" My question is:- Why would an alien with a high tech TARDIS carry around a box of matches?
To light his pipe.
We see the scene where the prehistoric men first see the Doctor light fire here (although it's not super-clear that matches were involved):
Your memory of the situation seems to be slightly off in that he wasn't intending to show off, but rather was observed (by someone who does come to believe, and tell others, that he makes fire from his fingers), and perhaps there were other, later, scenes where he did something similar to what you remember, but this first instance reveals the answer: to light his pipe.
Keep in mind that although he is an alien with a hi-tech TARDIS, he both had an appreciation for and lived on Earth, at that time masquerading as a human. Bringing forth a self-lighting pipe or some technological doo-dad would have seemed out of place in 1960s society, so, if he wanted to light a pipe, particularly when he was out and about in modern day society (such as might be required for getting Susan registered in school), carrying matches would be a good habit to get into.
Why he might like to light a pipe would be a separate question.
According to here the Doctor smoked a pipe in the first story, An Unearthly Child