According to Jan Heine, if you don't brake hard enough to lock up the rear wheel (using only the rear brake) your weight doesn't shift forward. Experienced riders (probably most of us on this forum) know instinctively that braking with only or mostly the rear brake will greatly increase our stopping distance or make our bike unstable (depending on how hard we brake), even if we haven't thought through the physics or tested it like Heine. For the OP, and all new riders, here is a great little article that will make you a better, more confident rider:
How to Brake on a Bicycle | Off The Beaten Path