Now you might think that Ahaziah would have had enough sense to leave things as they were, but no, he was a particularly stupid little king, and he was definitely lacking in the respect-for-God department.
The king decided to PUNISH Elijah for what he had said.