Miyamoto explains where the idea for Mario’s pipes came from
Interviewer: The original Mario Bros. also established that Mario was a plumber.
Miyamoto: We were trying to think of what other enemies the Mario Bros could have in addition to turtles, and we came up with crabs and flies. So we figured the only environment with all three of those creatures―turtles, crabs, and flies―would be an underground tunnel. (laughs) Some huge underground tunnels that must exist somewhere… like under New York, I thought.
Interviewer: Hah! Your design process is like a free association game. It must have been a lot of fun working in this way.
Miyamoto: At this point though, we still hadn’t thought of the pipes yet. Due to the way the screens worked, enemies that went to the bottom had to re-appear at the top of the screen. So that got us thinking, OK, we need a path or some way for them to get back up there. Then one day I happened to be walking through the streets of Kyoto, and I saw a plastic pipe sticking out of a wall.
[Game Maestro: Vol. 1]