I have never ever heard that rule before... I would believe that key wouldn't matter, only that the 5 pieces were contrasting, especially the 2 that might happen to be in the same key. I would be pretty shocked if it were 'actually' true... but I seriously doubt it. Has your Piano Teacher played in any competitions when she was younger or does she still play in competitions??? What is her Piano Proficiency level like???
In a competition, is it alright to play two of five songs in the same key? My piano teacher doesn't seem to think so.
If you're playing songs I don't know what you're doing in a piano competition