In this chapter, Joash repairs the temple.
Continuing with what I said in the previous chapter, verse 2 tells us that Joash does what is right for as long as Jehoiada the priest was alive to instruct him. In my opinion, Joash is a nominal power and Jehoiada is the real power, since Joash obeys Jehoiada.
Even though Joash is a righteous king and Jehoiada instructs him, v. 3 tells us that the high places are not taken away. It's not entirely clear if these high places are used to worship the LORD or worship other gods of the land, but regardless of that, the people were commanded in the Law of Moses to only offer sacrifices at the temple, so the high places are a violation of that command. Even in times of revival, like during the reign of Joash, there is still this persistent sin that almost never goes away: for nearly all of Israel and Judah's history, their obedience to the Law is never complete and total.
Beginning in verse 4, we learn that Joash wishes to repair the damage to the temple. To me, this comes as a bit of a surprise. In the simplest terms, what it means is that the temple has been damaged and has fallen into disrepair. How is this possible? The very fact that the temple needs to be repaired means that the people of Jerusalem have not been maintaining it, which by itself indicates the dire condition of their faith.
We know that Athaliah was a worshiper of Baal, so it's possible this is her fault as she reigned for six years, but I think it's likely that the temple was beginning to fall into disrepair at least in Ahaziah's reign, since Ahaziah was heavily influenced by Athaliah and his alliance with Joram.
Regardless of when it began, the decay that has beset the temple of God merely imitates the decay in the faith of Israel: if they had loved God and sought to keep his commands, it is only natural that they would have protected and preserved the temple. Like it says in 2 Samuel 7:2, David desired to build a temple for God, because he wanted to honor God and secure God's house in the middle of their nation. In this chapter, we see the opposite when the people neglect the temple of God because they neglect and ignore the God who lives in that temple.
Nevertheless, Joash attempts to turn that around by repairing the temple and he commissions the priests to collect offerings to repair the temple. What we discover in verse 6 is that the priests had been very effective at collecting money (isn't everyone?) but not effective at spending it on repairing the temple. It's more likely that the priests were spending the money on their own livelihood, and that's why king Joash commands them to stop collecting money. Instead, the money is placed in a box where it can be counted and tracked by the "king's scribe", i.e. a royal official not associated with the priesthood. What had happened to date was the priests collecting money but then spending it on their own personal needs, i.e. theft. At this point, the king is demanding to have one of his own officials oversee the repairs so that they actually happen.
If it's a bad thing that the temple drifted into disrepair, it's even worse when the priests who are supposed to be collecting money to repair the temple take that money and spend it on themselves, rather than fulfill their duty. In the short term this isn't a problem because when a righteous king like Joash is in charge, he can take over the project and make sure it happens. But in the long term, having a priesthood more dedicated to their own personal comfort and wealth than the temple that they ostensibly serve is a grim omen for Judah's future with God. If the priests cannot keep their faith, what hope is there for the laity to stay true to God?
Verse 16 is not a problem, it simply tells us that the money from sin and guilt offerings goes to the priests, which is okay because that money is dedicated to them as their assigned portion in the Law of Moses. Rashi tells us that the priests would spend that excess money to purchase burnt offerings, so even this money the priests would not take for themselves.
The problem was that verse 4 is talking about several other kinds of religious collections, including the "assessment" (Exodus 30:13), a small annual tax, and freewill offerings (voluntary offerings that could be made at any time). These offerings were given to the priests so that they could in turn spend the money on repairing the temple, but they did not.
After Joash takes over the temple repairs, it sounds like they go off well and everything works out. Verse 17 jumps to a different story, long after the temple repairs, and tells us that when Hazael (whom Elisha anointed to be king of Aram) comes to attack Jerusalem, Joash bribes him to leave by giving him all the gold and "sacred things" from God's temple. The author of Kings does not include any moral commentary on this passage, but it should set off immediate red flags in our minds because Joash is literally emptying out the temple in order to pay off someone who was attacking him. This is an act of profound faithlessness. Why does Joash not trust God to protect him and destroy his enemies? This is a remarkable and distressing change of character from what we had seen of Joash so far. Joash, who reigned so well "all his days in which Jehoiada the priest instructed him", appears to have fallen apart tragically after Jehoiada died. What this shows is that not only was Jehoiada a major power behind Joash's throne, he was also Joash's moral and religious backbone. As soon as Jehoiada died, Joash appeared to have lost his faith in God. Joash goes from repairing the temple to pillaging it.
In verse 20, things go from bad to worse. Joash tries emptying out the temple to buy safety, but ultimately finds that safety apart from faith in God cannot buy what he seeks. While he can buy off a foreign king, he cannot buy off his own men, who assassinate him. A tragic end to a king who did well in his earlier years.
The moral? Nobody can get through life depending on the faith of another person to carry you through. In my opinion, everyone must develop their own faith in God. It is possible to depend on someone else's faith for a particular time or season, like a crutch, but just like a crutch it has to be temporary. If you cling to a crutch and use it your whole life, that dependency can actually make you weaker over time. I think it's pretty clear that Joash was depending on Jehoiada's faith and wisdom to guide him and he never developed his own. As soon as Jehoiada died, Joash collapsed spectacularly, impoverishing his nation and losing his own life in short order. We can only hope that his son will do better.