Haftarah for Shemini
David gathered 30,000 prominent people from all the Tribes to retrieve the Ark from the house of Avinadav, where it resided since being returned by the Philistines back in I Samuel chapter 7. They put it on a new wagon, which was led by Avinadav's sons, Uzzah and Achyo. David and the rest of the people danced and played instruments in celebration.
Then, tragedy struck. The Ark slipped, so Uzzah reached out and grabbed it. The Navi doesn't call it a sin, he calls it an error, but the result was the same: Uzzah died. David was distraught and had second thoughts about bringing the Ark to Jerusalem. Instead, they left it in the home of a man named Oveid-Edom, where it resided for three months.
David saw that Oveid-Edom's household was blessed because of the Ark's presence, so he decided to try again. This time he had the Ark carried by Levites, and he offered sacrifices every six steps. David danced with unbridled joy. His wife Michal saw him leaping about and thought it was undignified; she criticized him that even the maidservants would look down on him. David replied He danced in front of Hashem and that if he humbled himself in front of G-d, even those same maidservants would praise him for it. As a punishment for speaking so insolently to David, Michal had no children until the day she died.
Now, that last bit requires some thought, as we know that Michal had a son. Two explanations are given: (1) Her son was already born at this time and Michal had no further children for the rest of her life; (2) Michal died in childbirth, with the result that she had no children "until the day of her death."
So here's David, living comfortably in his new palace, secure from his enemies on all sides. He turns to the prophet Nathan and says, "Why should I live in a house and G-d's Ark still be covered by a tent?" Nathan understood that David wanted to build the Temple and he agreed that it was a good idea.
G-d disagreed. He appeared to Nathan that night with a message for David. G-d said that His Presence had been in a tent since the Jews left Egypt and He never asked for a Temple. He said to tell David that he would not be the one to build it, but that his son, yet to be born, would be the one to build it. Furthermore, that son's dynasty would be eternal. Even when they deserved punishment, the kings descended from David would never lose the throne as Shaul had. (We see from here that Moshiach - the Messiah - must be descended not only from David, but specifically from his son Shlomo - Solomon.)
Excerpted from The OU's Nach Yomi