hills feel hard and more muscular for newer riders/untrained riders because of lack of aerobic fitness, so their power ceiling is lower, so they tap into their anaerobic power capacity. The more you train, you raise the ceiling higher and the power to get up the hills gets more into the aerobic region and your legs aren't always burning (unless you're trying to chase faster people!).
So it's an easy assumption to think weight lifting would help since people are under the impression it's about leg strength, but it really comes down to aerobic fitness.