The spacing effect is one of the most robustly replicated findings in learning science, first documented by Hermann Ebbinghaus in the 1880s using himself as the subject: he memorized nonsense syllables and tracked his own recall over time, discovering what's now called the "forgetting curve" — memory fades fastest right after learning, then more slowly — and that spaced review sessions dramatically outperformed massed study for the same total time invested, even though cramming often produces better performance on an immediate test. This happens because spaced repetition forces retrieval after some forgetting has already begun, and the act of successfully retrieving a partially-forgotten memory strengthens it more than reviewing something still fresh in mind.
The practical implication is specific: if a test is tomorrow, cramming tonight will likely outperform a spaced schedule on that specific test. But for anything meant to be retained past that test — which is most of what's actually worth learning — spaced repetition wins decisively, which is the whole rationale behind flashcard systems that deliberately increase the interval between reviews of items you already know.