It doesnt make sense because Happiny is so small and has low stats in game.
Pokemon is a cartoon. You can't expect everything to be realistic, for example how can Onix fit into a Pokeball? How can Team Rocket survive falls from Hundreds of feet almost every episode? Again, it's a cartoon so it doesn't have to be realistic.
In the anime, as a joke hapiny had extreme strength and could bust open manholes, carry heavy Pokemon etc. etc.
Happiny knows strength in the anime and that's how it can carry the rocks. Trust me. Happiny knows lots of moves it couldn't know in the game. Pokemon isn't logic, its Pokemon.
It was a running gag on the show. How can an itty-bitty Happiny carry huge rocks? There are lot of this kind stuff on the show for comic relief.