I chalked his living up to it being a kid's show and executions not really being okay. In this case though, executing him could cause significant ill will in the Earth Kingdom. That's bad juju for Azula's rule.