People smoke pipes and other things for many reasons, probably. Trying to visualize how it all started, it seems like folks seated around the fire in their cave, hogan, teepee, or other residence liked the smell of the burning wood, and probably threw on the occasional herbs and found them aromatic.
So someone suggested they might smell the aromas better if they drew it from the cloud of smoke above the fire through a reed. After a few generations of that, people figured out they could attach the reed to a little bowl and taste the burning herbs in their mouthes that way, and the pipe was born.
Conversational smoking, ceremonial smoking, after-hunt smoking, and pure recreational smoking followed, by this hypothesis. It could be true.
This isn't why we smoke, but an idea of how we came to smoke. For the why, we enter the recesses of the human mind, as you will.