Difficulty is a signal to your brain that something should be remembered.
Your brain is lazy. When a task is easy, your brain spends no effort on remembering it. Your brain assumes that what's easy for you now will be easy forever.
But when information is difficult to retrieve, the brain reinforces the associated neural pathways. As you struggle through the jungle of knowledge, your brain remembers the cuts, not the paths.