It's the same reason you stand up and pedal if you want to really put a lot of force on the pedals on a flat surface. Standing up let's your put your body weight into each downstroke of your legs. If you keep standing and go from a flat surface to a hill you will notice that your body stays straight up and down while the bike shifts backwards.