Rabbi Wagensberg on Parshas Shoftim 2019

"A Rhyme and a Reason Can Cause a Crime and a Treason"
In this week's parsha we are told about appointing a king over the Jewish people. The Torah says that a Jewish king may not have too many wives because they will turn his heart away from Hashem. The Torah also says that a Jewish king may not have too many horses because they will cause him to go back to Egypt where he will be able to increase his horses, and Hashem already told us that we should never go back to Mitzrayim (17:14-17).
Although at first glance these verses appear to apply only to a Jewish king, nevertheless, upon further analysis we find that there is a message contained within these verses that speak to each and every one of us. This lesson is found in the following Gemara.
The Gemara (Sanhedrin, chap. 2, "Kohein Gadol", pg. 21b) cites Rebbi Yitzchak who asks why the Torah, in general, does not offer reasons for the mitzvos? He answers by saying that it is because in two instances the Torah did reveal the reasons of the mitzva, and a great man stumbled as a result of those reasons.
For example, the Torah says that a Jewish king may not have too many wives BECAUSE they will lead his heart astray, away from Hashem. Shlomo Hamelech said, "I will increase and they won't lead my heart away from Hashem." Yet, it says, "And it was that when Shlomo grew old, his wives swayed his heart (to idolatry" (Melachim Aleph, 11:4).
Another example is that the Torah says that a Jewish king may not have too many horses BECAUSE they will lead him back to Mitzrayim. Shlomo Hamelech said, "I will increase and I will not return to Egypt." Yet, the verse says, "And a chariot was brought out from Egypt" (Melachim Aleph, 10:29).
Therefore, we all learn a lesson from this which is that we should not use, or shall I say abuse, the reasons for mitzvos in the Torah to say, "According to that reason, I am exempt from doing the mitzva." Rather, we are supposed to do the mitzvos anyway and not look for excuses to exempt ourselves from fulfilling them.
However, the question is, how could Shlomo have thought that he was wiser than the Torah as to increase his wives thinking that they would not lead him astray? That's like thinking that he was wiser than Hashem. Didn't Shlomo know of the teaching that says that a person cannot trust himself until the day he dies (Pirkei Avos, 2:4, Hillel)?
This is especially problematic in light of the verses that tell us about Shlomo's wisdom. When Hashem appeared to Shlomo in a prophetic vision at night, Hashem told Shlomo to make any request and it would be granted to him. Shlomo did not ask for riches. Rather, he asked for knowledge so that he could judge the people properly. Hashem granted this request and made Shlomo wiser than anybody before him and smarter than anybody after him (Melachim Aleph, 3:5-14). How could such a wise Shlomo think that he could outsmart God? Shouldn't the wisest scholar of all realize that Hashem knows best?
One approach to understanding this is found in the Gemara (Sota, chap. 1, "Hamekaneh", pg. 3a) where Reish Lakish says that a person only comes to sin because of a "Ruach Shtus" (spirit of silliness) that enters into his mind. One explanation of this statement is found in another Gemara (Tamid, chap. 4, "Lo Hayu Koftin", pg. 32a) which says, "Who is a wise person? One who can see the future."
The reason why seeing the future is the determining factor of a wise person is because if a person could envision how doing a mitzva today would bring him reward tomorrow, and if a person could foresee how doing a sin today would bring him punishment tomorrow, he would behave today by doing mitzvos and not sin.
However, if a "Ruach Shtus" enters into his mind, he would be prevented from visualizing the ramifications of his actions, which could lead him to only live in the moment and sin with the object of his desire.
The Shvilei Pinchas says that this explains what Shlomo was thinking when he said, "I will increase and I will not go astray." Shlomo made the following observation.
Shlomo saw that the Torah, in general, does not offer reasons for the mitzvos. But then Shlomo saw that suddenly, in this week's parsha, with respect to a Jewish king, the Torah did give reasons. Shlomo asked himself, "Why would Hashem suddenly reveal reasons by the topic of a Jewish king?" Shlomo answered his own question by saying, "It must be to hint to us that should there arise a king who would not go astray, he would be exempt from this restriction."
Shlomo saw that Hashem had blessed him with so much knowledge so that he would be able to judge the people properly. Therefore, Shlomo thought that he was immune to "Ruach Shtus," because a "Ruach Shtus" would prevent him from judging the people properly. Shlomo reasoned that if he was not susceptible to "Ruach Shtus", and if he was indeed a wise person who can foresee the future, then he would be able to increase wives and he would not be led astray.
However, if this is what Shlomo thought, what happened to his theory? How did his wives lead him astray to the point that they got him to worship foreign gods?
The Gemara (Shabbos, chap. 5, "Bameh Biheima", pg. 56b) answers this question. Rav Shmuel bar Nachmeini cites Rebbi Yonasan who says that anybody who says that Shlomo sinned is making a mistake. The Gemara attacks this statement by saying that the verse says that Shlomo's wives caused his heart to stray. Apparently, Shlomo did sin?
The Gemara answers by saying that the verse is to be read as, "Shlomo's wives ATTEMPTED to cause Shlomo's heart to stray, but they did not succeed. The Gemara still attacks this because the pasuk explicitly says, "And Shlomo did what was sinful in the eyes of Hashem" (Melachim Aleph, 11:6).
The Gemara answers that Shlomo did not actually sin with idolatry, rather, Shlomo did not rebuke his wives for their worshiping of foreign gods. Therefore, it was considered as if Shlomo sinned with idolatry. This is because whenever a person is in a position to admonish others, and he knows how to rebuke others, but he doesn't, he is credited with their sin.
However, a question still remains. Why didn't Shlomo rebuke his wives? This is a mitzva in the Torah (Parshas Kedoshim, 19:17). How could Shlomo ignore this mitzva?
Once again, the Gemara (Shabbos ibid) answers this question by saying that it was really Hashem who withheld Shlomo from rebuking his wives so that he would be credited with idolatry. The reason why Hashem did this to Shlomo was to make an example of him to teach a lesson to all generations to come. That is, we should never use the reasons given for the mitzvos to try and wiggle out of our responsibilities because look what happened to Shlomo when he tried to do that.
The Shvilei Pinchas says that this explains the juxtaposition between the topic of appointing Jewish kings (Parshas Shoftim, 17:14-20) and the verse, "Tamim Tihiyeh Im Hashem Elokecha" (be wholehearted with Hashem your God; Parshas Shoftim, 18:13). The topic of Jewish kings reminds us of Shlomo Hamelech who used the reason of the mitzva to exempt himself from the mitzva. We are supposed to learn from Shlomo not to repeat that mistake. Rather, we should do the mitzvos "Bitimimus" (with simplicity). Meaning, we should not be too smart for ourselves. Rather, we should just do the mitzvos because Hashem told us to.
At this point, let us talk about Shlomo's marriage to Bas Pharaoh whom he married on the very night that he completed building the first Beis Hamikdash (Melachim Aleph, 3:1).
The Midrash (Vayikra Rabba, Parshas Shmini, 12:5; Bamidbar Rabba, Parshas Naso, 10:4) tells us that during the seven years it took for Shlomo to build the Beis Hamikdash, he did not drink wine. But, on the night of when he completed the construction of the Beis Hamikdash, he married Batya, the daughter of Pharaoh, and he drank wine. There were two celebrations going on in Shlomo's palace that night. One was the celebration of having completed building the Beis Hamikdash, and the other was the marriage celebration to Bas Pharaoh.
Shlomo's joy over his marriage to Bas Pharaoh exceeded his joy over the completion of the building of the Beis Hamikdash. At that moment, Hashem made up His mind that He would eventually destroy the Beis Hamikdash (Yirmiyahu, 32:31). Rebbi Chunya says that Bas Pharaoh danced eighty dances in front of Shlomo that night. She also sang one thousand songs. Bas Pharaoh said that this was the way they used to celebrate when they worshiped idols back in Mitzrayim.
Bas Pharaoh made a new canopy which covered Shlomo's bed. She sewed diamonds onto it so that they would look like stars and planets. She did this to ensure that Shlomo would sleep late the next morning. Her plan was that every time Shlomo would wake up, he would see the diamonds, think that they were the stars, say to himself that it's still nighttime, and go back to sleep. It worked. Shlomo partied and drank so much that night that he collapsed in his bed and was fast asleep with the keys to the Beis Hamikdash under his head. Every time he woke up, he saw what looked like stars and went back to sleep, thinking that it was still nighttime.
The next morning huge crowds of Jews gathered at the entrance of the newly built Beis Hamikdash in order to do the Avoda there, but they could not get in because the gates were locked and the keys were under Shlomo's sleepy head. They were frightened to wake up the king for fear that he might execute them. So, some of the people went to Shlomo's mother, Bat Sheva, at told her what was going on.
When Bat Sheva realized what was happening, she went to Shlomo's palace, barged into his bedroom and found Shlomo sleeping. Bat Sheva took off her shoe and began slapping Shlomo's face back and forth with it. Bat Sheva said, "What is with you my son (Mishlei, 31:2). As long as Dovid was alive you were righteous. Now that your father has passed, people will think that I am a bad mother. Do not give your strength to women (Mishlei, 31:3). Get up and open the gates of the Beis Hamikdash so that the Avoda can be done." It turned out that on the first day of the Beis Hamikdash, the morning offering was brought late, in the fourth hour of the day.
Hashem was so angry about all of this that He decided to not just destroy the first Beis Hamikdash, but He even decided to destroy the second Beis Hamikdash as well. We see this from the Gemara (Sanhedrin, chap. 2, "Kohein Gadol", pg. 23b) where rebbi Yitzchak says that on the night that Shlomo married Bas Pharaoh, Gavriel the angel descended and stuck a reed in the sea and a sand-bank gathered around that reed upon which the great city of Rome was built. Rome wasn't built in a day; it was built in a night. The second Beis Hamikdash was destroyed by Rome. Since Rome was founded on the evening that Shlomo married Bas Pharaoh, we see that Hashem already planned to destroy even the second Beis Hamikdash because of Shlomo's sin with Bas Pharaoh that night.
This begs us to ask, why did Shlomo marry Bas Pharaoh davka on the night that he completed building the Beis Hamikdash? Couldn't he wait one more night to marry her? Additionally, how could Shlomo rejoice over his marriage with Bas Pharaoh more than he rejoiced over the construction of the Beis Hamikdash? We are talking about a very great person. Shlomo was a tzaddik, a dayan, a rav and prophet. How could he value his marriage to Bas Pharaoh more than he valued the Beis Hamikdash?
Moreover, why did Shlomo keep the keys to the Beis Hamikdash under his head? Was he not able to afford a key cabinet or a key safe to hang his keys on?
Furthermore, why did Bas Pharaoh make a studded canopy so that Shlomo would sleep late the next morning?
To address all of this, we are going to share a kabbalistic secret.
The Arizal (Sefer Hagilgulim, chaps. 63 & 64) says that Shlomo Hamelech was a gilgul (reincarnation) of Moshe Rabbenu. A hint which supports this is found in Tehillim (90:1) where it says, "Tefillah L'Moshe" (a prayer of Moshe). When the letters in the word "L'Moshe" are rearranged, it spells, "Shlomo." This shows us that "Shlomo" was "Moshe," meaning that Shlomo was Moshe's gilgul.
The Arizal continues to say that the Bas Pharaoh that Shlomo married was a gilgul of the Bas Pharaoh who lived in the days of Moshe Rabbenu. A support to this idea is the Midrash we mentioned above which said that the name of the Bas Pharaoh that Shlomo married was "Batya." The name of the Bas Pharaoh who lived during Moshe's lifetime was also named "Batya." The identical names are not arbitrary. Rather, it comes to teach us that they were essentially the same person.
However, the Arizal modifies this revelation. He says that when Bas Pharaoh in the days of Moshe went down to bathe herself in the river (Parshas Shemos, 2:5), she wasn't only taking a bath, she went to immerse herself and convert to Judaism (Sota, chap. 1, "Hamekaneh", pg. 12b, Rebbi Yochanan). Although Batya was Jewish, only fifty percent of her soul was purified. Therefore, when Batya died, that fifty percent of her soul went up to Heaven.
However, the other fifty percent of her soul remained contaminated from the impurities that she inherited in her spiritual DNA from her father, Pharaoh. Therefore, when she died, that fifty percent of her soul had to come back down to this world for a tikkun (fixing).
This explains why Shlomo desired Bas Pharoh so much. As a prophet, Shlomo knew that he was a gilgul of Moshe and he knew that this Batya was a gilgul of fifty percent of the old Batya. Shlomo wanted to marry her so that he could distance her from her idolatrous ways and bring her closer to Hashem thereby fixing that fifty percent of her soul. In this way, Batya's entire soul would be allowed entrance into Gan Eden.
After all, this was simply a case of Hakaras Hatov (gratitude). Shlomo realized that in their previous lives, Batya, was moser nefesh (sacrificed) to save baby Moshe from the river which could have gotten her killed. Therefore, Shlomo, alias Moshe, attempted to repay the kindness by trying to spiritually save Bas Pharaoh, alias Batya.
Unfortunately, Shlomo's attempts did not work because his wife Batya continued to practice idolatry even after they got married. It turns out that Shlomo ignored, to a certain degree, the celebration over the completion of the building of the Beis Hamikdash, and focused more on the celebration of his marriage to Bas Pharaoh because he wanted to be mekarev her. Had Shlomo succeeded, Hashem would have overlooked the disgrace that incurred to the Beis Hamikdash.
But, since Shlomo's plan did not work, retroactively, there was a disgrace to the Beis Hamikdash which could not be overlooked. Therefore, Shlomo had to come back into this world again as Yirmiya Hanavi and witness the destruction of the Beis Hamikdash which atoned for his previous digrace of the Beis Hamikdash.
There is a hint which supports this notion that Yirmiyahu Hanavi was a gilgul of Shlomo Hamelech. That is, Shlomo called himself a "Little boy" (Melachim Alef, 3:7), and Yirmiyahu Hanavi also called himself a "Little boy" (Yirmiya, 1:6). These identical verses are not arbitrary, but rather they come to allude that Shlomo and Yirmiya shared the same soul.
Based on this teaching from the Arizal, we will be able to understand what Shlomo was trying to do by building the Beis Hamikdash, besides just building a Temple.
We all know that Moshe desperately wanted to enter into Eretz Yisrael. The question is, "Why did he want to come to Eretz Yisrael so much?" The Megaleh Amukos (Rabbi Nasan Nata Spira, 1585-1633, Poland; Vaeschanan, 20) says that Moshe wanted to enter Eretz Yisrael so that he could build up Yerushalayim and build the Beis Hamikdash.
We can see this from the verse in which Moshe says, "Let me cross now and see the good land that is on the other side of the Jordan, Hahar Hatov Hazeh (this good mountain) Vihalevanon (and the Lebanon; Parshas Vaeschanan, 3:25). Rashi (ibid, citing Sifri, Parshas Pinchas, 27) comments that "Hahar Hatov" refers to Yerushalayim, and "Levanon" refers to the Beis Hamikdash.
One reason why the Beis Hamikdash is referred to as "Levavon," is because it comes to teach us that even if a person enters the Beis Hamikdash soiled with the redness of sin, by the time he leaves the Beis Hamikdash, he exits cleansed as white as snow. Thus, the name "Levanon" whose root word is "Lavan" (white) teaches us that by the time a person leaves the Temple he will be as white and pure as snow.
We see from this verse that Moshe desired Eretz Yisrael because he wanted to build the Beis Hamikdash. Had Moshe done so, the Temple would have never been destroyed. This idea comes from the Gemara in Sota (chap. 1, "Hamekaneh", pg. 9a) which says that Hashem would never let something that Moshe built get destroyed. This is why the Mishkan, whose construction Moshe oversaw, was hidden away when the First Beis Hamikdash was built. Hiding the Mishkan ensured that it would never be destroyed by our enemies.
If Moshe would have built the Beis Hamikdash, it too would have never been destroyed. Although this sounds wonderful, there is a tremendous down side to such a situation. The Midrash (Eicha Rabba, 4:14, based on Tehillim, 79:1) says that Asaf sang a song of praise to Hashem about our enemies who destroyed the Beis Hamikdash. They asked Asaf how he could sing a song and celebrate the Temple's destruction when he should have cried and moaned over the destruction.
Asaf responded that although the churban was a tragedy, there was a tremendous benefit to it. When Jews sin, it causes Divine wrath, as it were. When Hashem punished the Jewish people, He poured out His wrath on the Temple of sticks and stones, and in so doing, He spared the flesh and blood of the Jewish people. Yes, Jews did die during the churban; however, had Hashem focused on the Jews and poured out His wrath on them, the Temple would have been spared, but there would not have been any Jews left. Therefore, the destruction of the Beis Hamikdash is something to celebrate because it ensures the survival of the Jewish people.
This explains why Hashem refused to honor Moshe's request to enter into Eretz Yisrael. It was in order to protect the Jewish people.
The Shvilei Pinchas adds that Shlomo Hamelech recognized that he was a gilgul of Moshe Rabbenu. As such, Shlomo wanted to build the Beis Hamikdash, just like he wanted to when he was Moshe. Shlomo wanted the Beis Hamikdash to last forever.
To avoid the problem about Hashem pouring out His anger on the Jews destroying them completely, Shlomo intended to bring the final Geula and he tried to nullify Galus. In other words, Shlomo wanted the first Bayis to be the only Bayis. Shlomo wanted to bring Moshiach, which he himself could have served as, thereby destroying the Yetzer Hara. There would be no more sin, and there would not be Divine wrath.
However, Shlomo was mistaken on two accounts. First, although he was a gilgul of Moshe, he was not on the same spiritual level that Moshe was on. Secondly, the time for the Final Redemption had not yet come.
A support to this idea that Shlomo wanted to be just like Moshe but failed is found in a verse in Koheles (12:10) which says, "Koheles (Slomo) sought to find words of delight." The Gemara (Rosh Hashana, chap. 1, "Arba'a Roshei Shanim", pg. 21b) says that this pasuk comes to teach us that Shlomo sought to be like Moshe. However, the very same verse in Koheles goes on to say that "words of truth" should be recorded properly, meaning, that truthfully speaking, "No other prophet ever arose in Israel like Moshe" (Parshas V'Zos Habracha, 34:10). This means to say that Shlomo was not on the same level as Moshe.
However, let us show "how" Shlomo intended on bringing the Final Geula. The Midrash (Shemos Rabba, Parshas Teruma, 35:5) says that in the future, all the nations of the world will come to bring gifts to Melech Hamoshiach. When Mitzrayim will come, Moshiach will think to himself that he should not accept a gift from them, but Hashem will tell him to accept their gift because, after all, they were our hosts in the past.
This entire Midrash requires explanation. What type of gifts are the nations going to bring us? Gold and silver? We are going to be so wealthy when Moshiach comes that we are not going to need those gifts.
The B'nei Yissaschar (Rabbi Tzvi Elimelech of Dinov, Poland, 1783-1841; Nissan 4:8) explains that the nations of the world are going to bring "sparks of holiness" that were trapped in their countries as their gift to Moshiach. These "sparks of holiness" are actually "Jewish souls" who were so much negatively effected by the decadent societies in which they lived that they became spiritually imprisoned in those places.
One example of these trapped souls is the Jewish people who died in Mitzrayim during the Plague of Darkness (Rashi Parsha Bo, 10:22, citing Shemos Rabba, 14:3). Those Jews became so Egyptianized that they remained in Egypt and they could not be rescued together with their brethren. However, when Moshiach comes, even those souls will be redeemed.
The B'nei Yissaschar (Adar, 2:7) explains why those souls were trapped in Mitzrayim. It is because there are fifty levels of holiness that Hashem created in this world, and opposite them, there are fifty levels of impurity. Those souls who were trapped in Mitzrayim had fallen to the fiftieth level of impurity. As such, Moshe was not able to save them because Moshe only reached the forty-ninth level of holiness (Rosh Hashana, chap. 1, "Arba Roshei Shanim", pg. 21b). As such, he could only rescue people who had fallen to the forty-ninth level of impurity. However, those who had sunken to the fiftieth level of impurity were out of Moshe Rabbenu's reach.
However, when the final redemption comes, Hashem will reveal the fiftieth level of holiness. Then, it will be possible to rescue even those who had sunken down to the fiftieth level of impurity.
This explains what was going on with the soul of Batya Bas Pharaoh in the days of Moshe. Half of her soul was on the forty-ninth level of impurity, whereas the other half of her soul had dropped to the fiftieth level of impurity. When she went down to the river, she stretched out her hand to rescue Moshe. Since baby Moshe was going to ascend to the forty-ninth level of holiness, when Batya touched Moshe, she was already impacted by that holiness.
The half part of her soul that was on minus forty-nine was redeemed, however the other part of her neshama was still spiritually contaminated from all of the impurities that she inherited from her father Pharaoh. That half of her soul could not even be saved by Moshe. That part of her soul would have to wait for its tikkun until the Final Geula would come when the fiftieth level of holiness will come into this world.
The Shvilei Pinchas explains that this is why Shlomo married Bas Pharaoh specifically on the same night that he completed building the Beis Hamikdash. It is because Shlomo, alias Moshe, felt that this was the Final Geula. Therefore, the fiftieth level of holiness is being revealed.
Shlomo thought that since the Aron Hakodesh was brought into in its final and permanent resting place, the fiftieth level of holiness would filter into this world through the Aron Hakodesh. We can see this idea in the word "Aron" whose letters can be rearranged to spell "Ohr Nun" (the light of fifty; Zera Kodesh Parshas Beha'alosecha).
Therefore, Shlomo chose to marry Bas Pharaoh specifically on the night that he completed building the Beis Hamikdash. Shlomo knew that he was Moshe, and he knew that Bas Pharaoh was Batya of the past. He knew that Moshe, who was on plus forty-nine, began the process of redeeming half of Batya's soul that was on minus forty-nine. But now that the Beis Hamikdash has been built, and the fiftieth level of holiness has begun to filter into this world, Shlomo (gilgul Moshe) would finish the job and rescue the other half of Batya's soul that had sunken into minus fifty. As soon as the Temple was built and the fiftieth level of Kedusha entered into this world, Shlomo wasted no time and married Bas Pharaoh right away to rescue her and repay the kindness that she bestowed upon him in their previous lives.
Shlomo's mistake was that the First Beis Hamikdash was not going to be the final and permanent one. The First Bayis was going to be temporary like the Mishkan was. Therefore, the fiftieth gate of holiness did not filter through the Aron Hakodesh, just as it did not filter through the Aron when it was in the Mishkan. Besides, the time for the Final Redemption had not yet come. Therefore, his mission of rescuing Bas Pharaoh failed.
The Arizal (Sha'ar Hagilgulim, chap. 67) adds an earlier historical backdrop which further explains why Batya was moser nefesh to save Moshe. He says that Bas Pharaoh (in the days of Moshe) was a gilgul of Chava, the wife of Adam Harishon. This is why her name became Batya. Chava had no parents. Rather, she was created directly by Hashem. Thus, her name "Batya" which are two words in one; "Bas - Kah" (the daughter of God).
The Arizal goes on to say that Moshe was a gilgul of Hevel. We can see Moshe's previous transmigrations hinted to in his name, Moshe. Moshe is spelled mem, shin, hey. Backwards, they stand as an acronym for: Hevel, Sheis, Moshe.
Therefore, when Batya went to rescue Moshe, it was really a case of a mother (Chava) going to rescue her child (Hevel). But it was much more than just that.
The Shvilei Pinchas points out that the Arizal (Sha'ar Hapesukim, Parshas Shemos) says that all of the Jewish souls were wrapped up in Adam Harishon's grand soul. When Adam sinned with the Eitz Hada'as, all Jewish souls sinned with him. As a result, all Jewish souls had to descend to Mitzrayim and experience Egyptian slavery to purge them of the spiritual filth that they had incurred from the Eitz Hada'as.
Now, Chava was the one who convinced Adam to partake of the Eitz Hada'as. As such, Chava triggered a succession of events. Chava caused the Jewish souls within Adam to become spiritually contaminated. Chava caused those souls to descend into Egyptian bondage. Therefore, Batya, alias Chava, felt horrible about the tortures that the Jewish people were enduring, because essentially, it was her fault.
Batya said to herself that if she got the Jews into this mess, she must try to get them out of it. Therefore, she was moser nefesh to save baby Moshe who would be the Roedeemer.
As we mentioned earlier, since Batya rescued Moshe, Shlomo, alias Moshe attempted to rescue Bas Pharaoh, alias Batya. Unfortunately, this attempt failed.
One more dimension must be mentioned to address some of our earlier questions.
The Alshich (Rabbi Moshe Alshich, 1508 Turkey-1593 Tzfas; Toras Moshe, Parshas Vayikra, 26:13, Divrei Hamaschil, "Oh Yomar") expounds on a Gemara (Pesachim, chap. 8, "Ha-isha", pg. 88b) and says that the first Beis Hamikdash was built in the merit of Avraham Avinu. However, since Avraham had a Yishmael, there was a ruination within Avraham and subsequently the first Beis Hamikdash had to be destroyed.
The second Beis Hamikdash was built in the merit of Yitzchak Avinu. However, since Yitzchak had an Eisav, there was a ruination within Yitzchak and subsequently the second Beis Hamikdash had to be destroyed.
However, the third Beis Hamikdash will be built in the merit of Ya'akov Avinu. Since all of Ya'akov's children were righteous, the third Temple will last forever.
The Shvilei Pinchas says that when Shlomo built the first Beis Hamikdash, he knew that it was in the merit of Avraham Avinu. He also realized that since Avraham had Yishmael, it was a stain that would ultimately tear down the Temple. Therefore, Shlomo tried to do something to remove the stain of Yishmael. This would allow the First Beis Hamikdash to remain standing forever. The action that Shlomo took to destroy Yishmael was to tap into zerizus (alacrity) which was the opposite of Yishmael who stood for laziness.
The Gemara (Sanhedrin, chap. 11, "Cheilek", pg. 98a) asks how Moshiach will come. Will he be riding on a donkey like it says in Zecharia (9:9), or will he be riding the Clouds of Glory like it says in Daniel (7:13). Rebbi Alexandari and Rebbi Yehoshua ben Levi answer this apparent contradiction based on another apparent contradiction. One verse says that Moshiach will come in its appointed time, and another verse says that Moshiach will come hastened before the appointed time (Yeshaya, 60:22).
The way to resolve all of this is to say that if Moshiach comes at the appointed time, he will be riding on a donkey. However, if Moshiach comes hastened before the appointed time, he will be riding on Clouds of Glory.
Rashi (ibid) and the Toras Chaim explain that if we do mitzvos with zerizus, then Moshiach will also come quickly, riding on Clouds of Glory. However, if we are lazy about mitzva performance, then Moshiach will also be lazy and come at the last possible moment, riding on a donkey.
Donkeys are animals that represent laziness. The nature of donkeys is to mope around. It is very difficult to get them to do what you want them to do. We even find support of this when the pasuk says, "And Avraham woke up 'early' in the morning (zerizus), and saddled his 'donkey' (atzlus). Avraham did not just saddle his donkey, but he conquered his inner 'donkey,' the negative trait of laziness.
Avraham told Yishmael to remain with the donkey (Parshas Vayeira, 22:5) because Yishmael is compared to a donkey. Both share the trait of laziness. Avraham began the process of nullifying Yishmael, but there was still work to be done.
This explains why Shlomo Hamelech kept the keys to the Beis Hamikdash under his head. It is because he intended on waking up early in the morning to open the gates of the Beis Hamikdash. Shlomo wanted to tap into the trait of zerizus. As such, he did not want anything to slow him down. He kept the keys under his head for easy and quick access.
By doing so, Shlomo wanted to destroy the trait of Yishmael (laziness) and remove the stain within Avraham so that the First Beis Hamikdash, which was built in the merit of Avraham, could last forever. Moshiach would come, the fiftieth level of holiness would enter into our world, and all those souls suffering in minus fifty, including Bas Pharaoh, would be redeemed.
However, since Bas Pharaoh still had that negative streak within her, she prevented Shlomo's plan from coming into fruition. This is why she studded the bed canopy with diamonds to appear like stars and planets. She wanted Shlomo to think it was still nighttime which would cause him to sleep late. This would be the behavior of a lazy person which would strengthen the force of Yishamel, which would cause the ultimate destruction of the First Beis Hamikdash that had been built in the merit of Avraham. Moshiach would not come and those trapped in minus fifty would not be redeemed.
From this entire episode, we see just how much Shlomo tried to bring Moshiach and the Geula Shileima. We too can follow in his footsteps. One practical way of achieving this would be to pick any mitzva, and do it with zerizus. We could also make a declaration saying, "May this mitzva with its zerizus be considered as one more brick in the Beis Hamikdash."
We could also try to make our homes more and more into a Mikdash Me'at by permeating them with more Torah, more Tefillah, more Mitzvos, and with more kedusha and tahara. Each Mikdash Me'at demonstrates that we are yearning for the Mikdash Hagadol.
So, may we all be blessed to follow in the footsteps of Moshe Rabbenu and Shlomo Hamelech by trying our best to lift ourselves and others even from the lowest spiritual levels up to the highest of stars, and thus be zocheh to hasten the Geula when all of us holy souls, including Batya Bas Pharaoh, will be led by Melech Hamoshiach to the Fiftieth Gate of Kedusha while drinking the wine from Sheishes Yimei Bereishis, dancing eighty dances before Hashem and singing a thousand songs of His praise in the Third Beis Hamikdash that will last forever.
Good Shabbos, Warmest wishes, Aba Wagensberg