That's the point of joke/anecdote. By studying you know the material and don't have to cheat, but the "tip" is voiced by someone more accustomed to cheating than studying, and so it's framed as a dishonest strategy.
That's the joke he referenced. Although there is a difference between knowing something and memorizing answers.
Knowing canned answers vs being able to come up with it yourself.