Robert Bjork makes a a great distinction between learning and performance which I think is important to keep in mind.
The need to distinguish between learning and performance:
One of the most time-honored distinctions in research on learning is the distinction between learning and performance. Basically, what we can observe during training is performance, whereas learning - conceived of as relatively permanent changes in cognitive, perceptual, and motor representations that will support long-term retention and transfer of knowledge and skills to the post-training contexts that are the target of training - must be inferred. The distinction is important because performance during training is often an unreliable guide to whether the desired learning has actually happened. Considerable learning can happen across periods when performance is not improving and, conversely, little or no learning can happen across periods when performance is improving markedly.
We rely heavily on our memory for learning and performance, what role does long-term memory have on performance?
An item in memory can be characterized by two "strengths," a storage strength and a retrieval strength. The former measures, in a general way, how well learned an item is; the latter measures the current ease of access to the item in memory. The probability that an item can be recalled in response to a given cue is completely determined by its retrieval strength (and on the retrieval strength of other items in the set of items associated to that cue) and is independent of its storage strength. That is, storage strength is a latent variable that has no direct effects on performance. Items with high storage strength can have low retrieval strength, and items with low storage strength can have high retrieval strength.
Performance is poor proxy for learning and this is easily overlooked.
The fact that some to-be-learned information is readily recallable during the learning process—owing, perhaps, to recency and/or cues that are present during learning but will not be present later—does not necessarily mean it will be recallable in another time and place, after the learning process has ended.
If the student's goal is merely to obtain enough information to pass (or even do well on) an upcoming test, then cramming may work fine. There is even a subset of students who do well in school who frequently cram for tests (e.g., Hartwig & Dunlosky 2012). Massing study sessions, though bad in the long-term, can yield good recall at a short retention interval, even better than spacing study sessions under some circumstances (e.g., Rawson & Kintsch 2005).
Not acknowledging this distinction and not learning how it affects learning and performance can keep us repeating mindless tasks over and over, like the sphex in this experiment.