I've done a little hillclimbing in the 1980's on my big bore 2 stroke bikes. It looks easy, right up until you try it. The idea that something slow can crawl up a hill with loose traction is incorrect. They just dig in and come to a stop.
HP is king.
On sandy climbs, the spinning tires create thrust by displacing the sand. The higher the HP, the higher the thrust, and the more likely the bike will make it to the top.