Because on a slope you are pedalling against the pull of the Earth, and on flat ground you are not.
On level ground the Earth pulls the cycle and you straight down, into the road. That pull does not oppose your forward motion at all — the only forces your muscles have to overcome are the friction of the road and tyres and the friction of the air. On a hill, every turn of the pedal also lifts you and the cycle a little higher, so now your muscular force has to work against gravity as well. The same speed therefore needs a much bigger push on the pedals, and that is what feels hard.