Okay, so in II Chronicles 21, we're told that Jehoram was a very bad king and walked in the ways of the kings of Israel, so God sent a message to Him through Elijah stating that God would take away Jehoram's children, wives, and possessions, and furthermore He would make Jehoram very sick until he died. And indeed, God does do all of these things, and specifically in II Chronicles 21, we're told that all of Jehoram's sons and wives were carried away, all except his youngest son Ahaziah (or the other variant of the name- Jehoahaz).
So Ahaziah takes over as king after Jehoram dies of sickness, but then when Ahaziah is killed, his mother Athaliah takes over. How is this possible since she was carried away with all the other wives of Jehoram? Was it customary for them to release the king's wives and children after the king had died? Or maybe after a certain amount of time? But if the king's possessions were released after the king (Jehoram) had died, then wouldn't his older sons have been released too? And if they were released, they'd be king, not Ahaziah. And I guess maybe the Philistines and Arabians who carried Jehoram's sons and wives away could have been feeling nice and left Athaliah with Ahaziah, so he could have his mother, but the Bible says that they were all carried away except Ahaziah, so it's not possible that she was left. And if they had left her, she could have just made more babies for Jehoram, so why would they let that happen? And once they had the wives and sons in their possession, why wouldn't they just kill them? I don't understand how she made it out alive, let alone made it out to rule a kingdom.
Then in II Chronicles 24:7, it says that Joash starts repairing the temple and upon repairing the temple, he finds that the sons of Athaliah had broken into the temple and take the sacred things to the Baals. How did the sons of Athaliah do that if they had been carried away? I suppose they could've done it before they were carried away, but why wouldn't the Bible mention that before they were carried away to avoid confusion considering that the Bible is usually far beyond overly-specific for the very purpose of avoiding confusion? And considering that the Arabians and Philistines probably didn't want Ahaziah to have an heir, wouldn't they kill all of Jehoram's other children that they captured? Or, is it that they left Athaliah behind with her son Ahaziah, and maybe that was possibly one of those customary things they did back then, and she did give Jehoram more sons, which were the sons that could've destroyed the temple while she reigned?
I think I need to learn more about customs back then because that usually ends up being the part of the equation I'm missing when I have questions about the Bible. And anymore when I have a question, I just jump straight to it probably being another custom of the time that I just don't know about.
You ran into a period in Israel's history that gets very confusing. After Solomon died, the kingdom of Israel was divided by the foolishness of Solomon's son Rehoboam. The northern group retained the name "Israel," while the southern group was called "Judah" because it was mainly composed of that one tribe. The northern kingdom, Israel, had one bad king after another. They suffered several coups, so different lineages came to power. The southern kingdom, Judah, had a mixture of good and bad kings. Only one family ever ruled in Judah. All were descendants of David.
Things got confusing when King Jehoshaphat of Judah decided to have one of his sons, Jehoram (also known as Joram), marry a daughter of King Ahab of Israel. Like people sometimes do today, they started naming their children after relatives. See the chart of The Kings of the Divided Kingdom to start laying out who is who.
The Jehoram in II Chronicles 21 was a king of Judah. He was the son of Jehoshaphat and the son-in-law of Ahab, king of Israel. Jehoram had all his brothers killed when he became king (II Chronicles 21:4) and for this God said he would be punished. "And a letter came to him from Elijah the prophet, saying, Thus says the LORD God of your father David: Because you have not walked in the ways of Jehoshaphat your father, or in the ways of Asa king of Judah, but have walked in the way of the kings of Israel, and have made Judah and the inhabitants of Jerusalem to play the harlot like the harlotry of the house of Ahab, and also have killed your brothers, those of your father's household, who were better than yourself, behold, the LORD will strike your people with a serious affliction - your children, your wives, and all your possessions; and you will become very sick with a disease of your intestines, until your intestines come out by reason of the sickness, day by day" (II Chronicles 21:12-15). Notice that God did not say specifically what would happen to Jehoram's wives and children.
"Moreover the LORD stirred up against Jehoram the spirit of the Philistines and the Arabians who were near the Ethiopians. And they came up into Judah and invaded it, and carried away all the possessions that were found in the king's house, and also his sons and his wives, so that there was not a son left to him except Jehoahaz, the youngest of his sons. After all this the LORD struck him in his intestines with an incurable disease" (II Chronicles 21:16-18). Notice that Jehoram's sons and wives are carted away, but then we learn that one son was left behind. We aren't told how many of his wives were removed and how many remained. The passage does not use the word "all." Since we later find Athaliah, Jehoahaz's mother, still around we conclude she wasn't among those carted off.
"For the sons of Athaliah, that wicked woman, had broken into the house of God, and had also presented all the dedicated things of the house of the LORD to the Baals" (II Chronicles 24:7). Remember that Jehoahaz was Jehoram and Athaliah's youngest son. It was the older children who were carried off. What we learn here is that these children (or even young adults) were not good people either. They had broken into God's Temple, robbed it, and gave some of the things to a false god. No wonder God had them carried off.
Why was Jehoahaz not carried off with the rest of his siblings? I know from God's view, it was to keep His promise to David that one of his descendants would always be on the throne. Why did the invading armies not take him away? We don't know.
No, Athaliah didn't have more sons at the end. Probably Jehoram was too sick by this time. And when she staged a coup to take over Judah at the death of her son, she tried to kill off all her grandchildren (II Kings 11:1-3). But Athaliah's sister-in-law defeated her by hiding one of Jehoahaz's baby sons. Thus, God's promise to David continued.