This happened before the prescribed punishments(hudud) were revealed, meaning the tradition of Anas.
Sunan Abi Dawud Book 40, Hadith 21
← Previous Hadith
When the Messenger of Allah (ﷺ) cut off (the hands and feet of) those who had stolen his camels and he had their eyes put out by fire (heated nails), Allah reprimanded him on that (action), and Allah, the Exalted, revealed: "The punishment of those who wage war against Allah and His Apostle and strive with might and main for mischief through the land is execution or crucifixion."
Sunan Abi Dawud Book 40, Hadith 20 Next Hadith → The verse "The punishment of those who wage war against Allah and His Apostle, and strive with might and main for mischief through the land is execution, or crucifixion, or the cutting off of hands and feet from opposite side or exile from the land...most merciful" was revealed about polytheists. If any of them repents before they are arrested, it does not prevent from inflicting on him the prescribed punishment which he deserves.
Sunan Abi Dawud Book 40, Hadith 22
Sunan Abi Dawud Book 40, Hadith 20 Next Hadith → The verse "The punishment of those who wage war against Allah and His Apostle, and strive with might and main for mischief through the land is execution, or crucifixion, or the cutting off of hands and feet from opposite side or exile from the land...most merciful" was revealed about polytheists. If any of them repents before they are arrested, it does not prevent from inflicting on him the prescribed punishment which he deserves.
Sunan Abi Dawud Book 40, Hadith 22