The Bible, being an accurate account of what really happened, is often filled with intrigue and treachery. Take for example the events which lead up to Joash becoming king in Jerusalem. Athaliah, when she saw that her son Ahaziah the king was dead, arose and destroyed all the seed royal of the house of Judah; then seized the throne for herself. But one young baby, Joash, was hidden from her. Then when Joash was seven years old, a priest named Jehoiada was able to lead a revolt against Athaliah and place Joash – the rightful heir – on the throne. He reigned for forty years. (2 Kings 11)
Okay, other than being a sordid bit of ancient history, what is so important about this story? Just this: God about two-hundred years earlier had made a promise to King David that his royal blood line would continue – it was to continue until the Messiah would come. (2 Samuel 7:11b-16) If Joash had perished along with his brothers, the royal line leading up to Christ would have ceased and God’s promise would have failed.
About eight hundred years after Athaliah, King Herod, in another attempt to destroy the royal heir, ordered his soldiers to kill all the babes of Bethlehem. He too failed. (Matthew 2) And like Athaliah and Herod, all other attempts to destroy the royal line failed because God had made a promise to His servant David.
Only God can do that. Only God can make a promise concerning a particular bloodline then so control the events of human history for a thousand years in order to set the promised descendant on the throne.