I just watched episode 57 when they explained it, but it's unclear to me. The Sand Village joins the Sound Village secretly, and planned to attack the Leaf Village. Because ever since the Leaf & Sand Village created the pact it affected their village (sand) somehow. How did it affect them?
From the naruto wiki
For years, Sunagakure suffered a series of budget cuts by the daimyō of the Land of Wind, weakening the village and thus re-routing ninja missions to Konoha. One day, Orochimaru, a missing-nin from Konoha who founded Otogakure, approached the Fourth Kazekage with the proposition of a joint invasion using the Chūnin Exams hosted in Konoha as a cover to attack
Hope this explains it better.
Garra is the secret weapon of the Sound village.
In the next episodes you shall find that the pact with the Sound village and the attack on the Hidden Leaf were all planned out by Orochimaru, or rather, Orochimaru disguised as the Kazekage, who used Sand village for his own purposes.
Hope this helps.