Solomon's marriage to the daughter of a powerful Egyptian king was a major diplomatic achievement, securing her a highly respected position among his wives [ביאור שטיינזלץ]. Over time, however, a conflict arose between her royal living arrangements and the deep spiritual sanctity of the city.
For twenty years, Pharaoh's daughter lived in Zion, the City of David. Eventually, Solomon made the active decision to move her out of this area and into a newly constructed home built specifically for her [רש״י, רד״ק, ביאור שטיינזלץ]. While other historical accounts simply mention that she relocated, the focus here is that Solomon personally initiated the move, driven entirely by a profound respect for the holiness of the location [מלבי״ם].
Because she was a wife with whom he maintained regular marital relations [מצודת דוד], Solomon determined it was inappropriate for her to remain in the royal complex. This restriction was not limited to a single building; rather, the entire compound and all the houses within the city limits were treated as a unified, sacred space [רש״י, רד״ק, מצודת דוד].
The source of this widespread holiness was the Ark of God. Although the Ark was brought into only one specific, dedicated structure, Solomon considered all the surrounding homes to be holy simply because the Ark had entered their vicinity. To honor and protect this sanctity, he established a separate residence for his wife, ensuring that everyday marital life remained at a respectful distance from the holy environment [רד״ק, מצודת דוד].