Ganon doesn't go into the dungeons because he, like all other evil beings, likes to sit in a locked room all day and wait for people to kill. Therefore, Zelda KNEW he would never get those triforce peices.
Presumably, she hid those triforce peices before Ganon was able to capture her. Which would also be before he was powrful enough to send out his monsters all over hyrule. So the dungeons would have been empty.
She started at the eighth palace, with all of the items as well, and placed them in an order that would be puzzling to all but the smartest of heroes. Only those with strong minds could put together the triforce of wisdom.
The monsters can't retreive the triforce for Gannon because they only know how to wander back and forth. So they might as well guard it, to keep it away from any heroes.
All of this was to keep the triforce from falling into the wrong hands. Anybody could mug wimpy old impa. But Zelda is too awesome to be stopped. Except by a fully powered Ganon. Which is why she hid it before.
And, you do need the triforce to fight Ganon. It's what turns him visible/vulnerable in the first place. The old man is therefore good, only letting people with the triforce by so they actually stand a chance. And as we all know, enemeis in those dungeons onl know how to wander around back and forth, not walk though doors. Or else, how are all those other old men in those other dungeons?
Also, Link doesn't just walk by him because it's a game and it's programmed that way. Lighten up :D
So, it all makes perfect sense.