The Gemara explores possible reasons for a mitzvah. In a baraita Rabbi Yehuda teaches that one may not take a loan security from a woman, particularly a widow, regardless of her financial status. Rabbi Simon says one cannot take from a poor widow because coming to her door in the morning and night will ruin her reputation. The Gemara resolves that marrying too many wives is different from this problem, providing a prooftext.
The Gemara attempts to understand why 18 is the number of wives allowed by looking at King David's wives. King David had six children from six different wives, then another six and another six. Other proofs suggest that 24 or even 48 wives might be allowed. Ra Kahana settles the argument by stating that "ka'hena", the likes of these, refers to six more, just like it did earlier.
King David's seventh wife was Michal, possibly also known as Eglah, because she was as dear to him as a calf. But didn't Eglah have a child and Michal did not? Prooftexts suggest that perhaps Michal bore a child the day she died and therefore she could be Eglah.
But instead Michal's time with King David was later in time. The Gemara considers the different children of King David and to whom they were born, in order. Some of King David's partners were called wives, who were betrothed and had ketubot. Others were concubines, who had no betrothals and no ketubot. Rabbi Yehuda suggests that King David had 400 children, descendants of the women taken captive in war. They wore their hair long, like Gentiles, and they sat in chariots at the front of the troops to intimidate others.
The Gemara discusses Tamar, the daughter of a yafet to'ar, where she was conceived before her mother converted. The rabbis discuss whether Tamar would have Amnon's sister if she were born after her mother had converted. We are told that Amnon was hated, and that Tamar was told to make special fried food for him. He then raped her, and hated her. The rabbis wonder why he hated her. Perhaps her pubic hair wrapped around his member and partially castrated him. But Jewish women do not have armpit or pubic hair, the rabbis say! As a daughter of a convert perhaps she had pubic hair.* The Gemara notes that if a king's daughter can be disgraced in this way, even 'immodest' women are at risk of rape. The laws regarding the seclusion of women and men together are based in part on this incident. The Gemara examines why mothers and sons are permitted to be secluded.
The Gemara goes on to explore why kings are not permitted to acquire extra horses or money. Even a king is forbidden to take pride in himself. King Shlomo is offered as an example of a king who had too many horses, too much money, and too many wives. The rabbis discuss how many stable houses, stables, and horses he must have had. Rabbi Yitzchak tells the story of Shlomo marrying the pharaoh's daughter, followed by Gavriel putting a reed in the sea. The water receded, sand rose from that place, and Rome was established there. The rabbis wonder about the reasons for the mitzvot. First, Shlomo thought that if he took too many, his heart would not be turned from G-d. Second, Shlomo thought that he will acquire too many wives and they will not return to Egypt.
The Mishna teaches that he writes a Sefer Torah for himself. Inheriting one is not enough. This is not only applying to a king. If one has two, one is stored away and the other is carried with him. We learn here that a Torah is not taken into a bathhouse, for it is only taken where it can be read.
We learn that the Torah was originally given to the people of Israel in holiness, in Hebrew letters.In the days of Ezra it was given in Aramaic. The community chose the Hebrew language as the one of holiness, and left Aramaic for common purposes. We are told that Ezra was worthy for the Torah to be given through him, just like the aliya of Moshe was for Torah. Proofs suggest that Ezra may have only changed the writing of the Torah rather than having it given to him, as well.
* Maharsha says that Jewish women remove this hair while the Maharshal says that G-d stops that hair from growing on Jewish women. Luria must not have paid much attention to his wife's hair removal practice, because almost all Jewish women I know have been subject to G-d's provision of hair.