The response to that command indicates the seriousness of what Jehoiada had allowed to happen. Money came in abundance. In fact, "All the leaders and all the people rejoiced and brought their tax and dropped it into the chest until it was full." (24:10). And so the temple was repaired. Yet, even as much as Jehoiada had been neglectful in following the LORD, his sins were nothing compared to those of Joash.
"They abandoned the house of the Lord, the God of their ancestors, and served the sacred poles and the idols." (24:19). The LORD sent prophets, but they would not listen - not even to Zechariah son of Jehoiada. In fact, "by command of the king they stoned him to death in the court of the house of the Lord." (24:21) Thus Joash killed his cousin, the son of those who had shown kindness to him by rescuing him from certain death and placing him on the throne. Joash eventually suffered defeat at the hands of a much smaller army because God acted on behalf or the Aramties. Having been left severely wounded by the battle, Joash's servants then killed him on his bed (because of the death of Jehoiada's son). They buried him in Jerusalem but not in the tombs of the kings.
It is a sad story, and one that I find a bit unnerving. It seems disconcerting that this child saved from certain death would turn against the LORD who had saved him and with whom he made a covenant - and then also against the family of his protectors and saviours. It is a story that seems unfit for Sunday School lessons. At the same time, it is the story of our ancestors in faith and rejecting God is hardly something that only Joash has chosen to do.