In a Q&A between Satoru Iwata and Shigeru Miyamoto, the two Nintendo brains talked Mario and his origins.
Why pipes and turtles - Miyamoto explains their origins, being inspired by Japanese manga and generally walking about and absorbing his environment.
The pair mention why Miyamoto opted for mushrooms to give Mario a little height, citing Alice and Wonderland and probably some drug experimenting (off the record of course) as his influence. Why do the mushrooms move? The joys and desperation of chasing to save your arse, that's why!
Miyamoto also explains the now iconic first goomba and mushroom you encounter - you can't attack as Mario so naturally you'd either run away or leap over it, but eventually you may misjudge and be able to stomp and kill the poor bugger, giving that trial and error learning curve.
On the subject of Jumping he also wanted to patent the idea of jumping, yes - jumping, back in the 80s. "Right, I'm not going to let those other games top us!"