why do we stand up while moving up a hill in bicycle?
Because you have not shifted gears properly. Standing up throws the whole weight of your body on the pedal so you can use the force of gravity as well as the force of you leg muscles to push the pedal when it get's too hard.
It's the same reason you stand up and pedal if you want to really put alot of force on the pedals on a flat surface. Standing up lets 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.
Separate names with a comma.