Simple Answer: It was used for evil.
"And God saw every thing that he had made, and, behold, it was very
good. And the evening and the morning were the sixth day."
The serpent was created good, therefore, when it 'spoke', which no snake can do, it was used by Satan, who is evil. Everything in the Garden was good, except Satan, and the "evil", on the Tree of the Knowledge of Good and Evil. God did not create evil, evil is the very antithesis of God. Through the snake, Satan convinced man to commit evil, in disobeying God's command. That warranted punishment by God, to both the man, who through a conscious choice of his will, disobeyed, and the snake, who has no 'will' to punish, nevertheless was the instrument of evil.
Satan was already under punishment,
"Then shall he say also unto them on the left hand, Depart from me, ye
cursed, into everlasting fire, prepared for the devil and his angels."
The fact that "The old serpent",(Rev. 21:2)
And he laid hold on the dragon, that old serpent, which is the Devil,
and Satan, and bound him a thousand years,
wasn't bound yet, and cast into Hell is a testimony to God's mercy and goodness; if Satan were cast then and there, then man would also be cast into Hell with him, then and there.
Rather, it is the mercy of God that God came up with a plan to redeem all mankind, and through that plan crush Satan's plan to destroy mankind.
And I will put enmity between thee and the woman, and between thy seed
and her seed; it shall bruise thy head, and thou shalt bruise his