Learning is as much forgetting as remembering. When I study something, I go for awhile, but eventually it becomes difficult, confusing, hard to see the forest for the trees. Particularly with technical information and skills like programming (or natural) languages. When I come back a little bit later, I find that I only remember the things that made sense; my confusions are forgotten, and there is fresh mental space…
Our subconcious mind often works on our problems while we aren't thinking about them, i that's more what's going on here than forgetting. your brain figured it out for you while you were doing something else
When I'm studying a foreign language, I learn some words and they stick, but I'm exposed to a bunch more that I don't remember next time. I forget those meanings, but the ones that stuck are now vivid and with me, brighter.
When I'm studying Kubernetes, I end up reading a ton of information that's irrelevant to the task at hand, and lots of it doesn't make that much sense because I'm new to it. The next day, when I come back, the things that I actually understood remain, ready to be the foundation for new learning, which they couldn't have been when they were mere data points in an overwhelmed brain. I don't remember the parts I was confused about yesterday, just this stuff that now makes sense.