Herod watched out for threats to his safety and took care of them. And John certainly appeared to be a threat. Some people thought he was the great prophet Elijah, who was said to be the forerunner of the Messiah
See, I am sending my messenger to prepare the way before me, and the Lord whom you seek will suddenly come to his temple. The messenger of the covenant in whom you delight--indeed, he is coming, says the Lord of Hosts.....
then I will draw near to you for judgment; I will be swift to bear witness against ... those who swear falsely, against those who oppress the hired workers in their wages, the widow and the orphan, against those who thrust aside the alien...(Malachi 3:1-5. Also see 4:5-6).
I'm assuming that the well being of hired workers, widows, orphans, and aliens was not high up on Herod's priority list.