I believe she had a good intention but her idea is not good at all.
The Socratic Method is a fantastic way to trigger a health conversation about a topic without forcing a "senior" idea over a "junior".
In my experience, asking someone to explain their intention behind a piece of code is a good way to:
1) Help the individual validate that the code is communicating their intentions
2) Discover if there is an different angle that the individual is not considering
3) Discover that the individual has actually produced a "good enough" quality and a risk/benefit analysis can be made with more information.