Why is the animal put to death? What did it do wrong?
Rashi : Because man sinned on account of it 1 - how much more so will a person, who possesses intelligence, be taken to task for causing others to sin.
Rashi (Bamidbar 22:33): Because Hashem takes pity on the dignity of human-beings. People should not say, this is the animal with which Ploni sinned.
If the sinner is killed by stoning, how is the animal put to death?
Targum Yonasan: By beating it with a club.