Why does cramming not work.
Short term memory:
Can you remember what you had for lunch two days ago? What shirt you wore? How much lunch cost? How many steps there are in preparing for exams? No. What makes you think you will remember some factoid from class, that you never heard of before? Sure you may remember it for a day or two, but that's it. Only when you make an effort to remember something repeatedly do you transfer that information into the other kind of memory, long term memory.
Long term memory:
Course information is the same thing. If you're learning something new it's harder to remember. It takes constant review and trying to remember specific information before you actually can. Once something is transferred from short term to long term memory we say it has been learned. (or at least remembered)
Cramming fails because you're relying on short term memory. This type
is fairly unreliable. Where were you at 2:32 yesterday afternoon? Your
brain once knew. Maybe there was a crime at your apartment and the police
want to know. Short term memory fails under stress. You doubt your memory.
The same thing happens when you take an exam, it's stressful.