Jehoiada the priest was not Joash's biological father, but he had acted as a father to him. He had essentially reared this king of Judah.
This passage recounts the murder that Jesus referred to in Matthew 23:35, when He said, "'You murdered [Zechariah] between the temple and the altar." It just shows what ingratitude can do to a person's thinking.
Let us evaluate Joash's character. He was a "fellow traveler." He was a leaner, a clinging vine, who did not have the resources within himself to choose his own course. Whenever he was pressured, he had nothing within to give him strength, so he drooped and spiritually died. Joash bent whichever way the wind blew. He was easily influenced by his peers. He went whatever way the crowd was going. His character reflected the crowd that he had joined. When Jehoiada was with him, and the influence was for good, then Joash was compliant and seemingly a good king. However, when he was with his peers, a bad crowd, he was afraid to buck his peers and his character plummeted. We should also add that he did not repent when he was warned.
In the end, he was assassinated and not buried with the kings (II Chronicles 24:25). Is that not an interesting contrast between him and his "father" Jehoiada, who was not even in the kingly line but a priest. Yet, he was held in such high regard that he was buried with the kings. We must conclude that Joash's character was merely programmed; it had not truly been internalized. It was not genuine.