See its like this, I was playing Pokemon Showdown and made this Torterra:
Torterra (M) @ Groundium Z
Ability: Shell Armour
- Rock Climb
- Frenzy Plant
But then it said that Torterra cannot learn Rock Climb.
Now, I've had some experience with a Torterra that I got in Soul Silver and HE knew Rock Climb. So I know that he can learn it from the HM. Someone told me its because there are no HM's in Sun/Moon.