Dogs learn by trial and error.
They rely on their teacher to reward the successful behaviors. The dog will then offer the rewarded behaviors more frequently than others. Eventually the dog will only offer the desired behavior. In order to make that very clear and easy the dog needs a reward every single time he performs the behavior correctly.
Once the dog understands what the behavior of that particular lesson is, you can work on the strength of the response by giving rewards at an irregular schedule. The dog works harder, because he knows the reward should be coming, but now he does not know exactly when or what kind of reward.
Bailey here shows a wonderful example of this.
Instead of playing faster he really hits the keyboard hard.
Watch: It is very funny!