Perhaps you are more familiar with car's gears, and why they need gears?
On a car, pulling away or going uphill, is done in a low gear. Same on a bike.
On a car, cruising on the highway is done in high gear. Same on a bike.
The gears match the engine with the load on the wheels. You are the engine, you can only pedal so hard, so gears are needed to ensure you can keep pedalling on any grade.