It's how brains work. Our brains are efficient. Brains require electrical signals or electricity to function. To put it simply, it consumes electricity. So the more efficient it is, the less energy it consumes and the more it's better for you.
Brains don't remember everything because all the things are not important to you. It works on cues. If it gets cues from you that something is important enough for you, it'll remember it. Otherwise, it won't move that event to the permanent memory.
You give cues to your brain in various ways. One of them is by repetitions. When you're repeating something, your brain gets the cue that it must be important for you to remember or something to that line.