William guessed that Sloth was standing somewhere in the shadows, watching over him. He also guessed what Sloth would think about, and so he decided to signal Sloth using this method.
The message was simple, let them come! I can handle them! William wasn't acting overconfident or way over his head or something, but he got what it took him to release such claims.
He got the mountain on his side, and he was the one securing the highest vantage point here. He had his arrows and grenades, explosives that could tear down large chunks of rocks, letting them freefall from such heights, landing fiercely and mercilessly over the heads of these monsters.
This was clear when the effect of what William released just now appeared in Sloth's spirit sense. The latter looked at the large number of rocks covered up with thick layers of snow, falling all the way from the top of the mountain down to the ground.