As a rule, this happens if the knowledge gained is not needed in later life. After all, you can successfully study, say, algebra at school. But if in your next life you do not have to deal with such calculations for several years, then everything will gradually "evaporate". And if you have to practice it every day in one way or another, you will want to, you will not forget.
The meaning of study is not only and not so much in memorizing information, but in at least some time in an intellectual environment, to learn how to work with educational materials and discipline during sessions, to practice preparing oral reports in front of an audience, to get critical thinking skills and writing experience. All this will certainly come in handy in life and work, even if all the factual information obtained during training evaporates somewhere.