If you give Mario a hammer, he would want to smash stuff with it. So you give him a koopa(A.K.A. Bowser) for him to smash. But smashing the koopa would make him think of building things, so you give him some wooden boards. Trying to build something is hard work and it reminds Mario of his own adventures. So he wants to go on one!

As he jumps into many pipes, it reminds him of fixing them, so he wants to fix the Smash Mansion's plumbing system. As he disassembles the pipes to unclog them, he screws up and now water is spewing all over the place. All the water makes Mario think of waterparks and wants to go to one, so you take him to a waterpark. He slips and slides down many waterslides and when he climbs up to go down one again, he realizes it looks like a big tree house.

Mario then gets an idea and wants to build a tree house with a waterslide of his own. So you take him back to the Smash Mansion(which is still flooding from the pipes) and he finds the biggest tree there. In order to build the tree house, he wanted wooden boards. So you give him the boards and he climbs to the highest branch. But Mario can't keep the boards together, so you give him nails. Mario placed the nails on the boards, but he had nothing to smash them with so,

He wanted a hammer to go with it.