Because God calls Himself Israel’s husband. If you read the short book of Hosea, you will see God identifying as Israel's husband and Israel identified as an unfaithful prostitute. Whenever Israel would look to earthly governmental alliances for protection and help, God viewed that as breaking her covenant with Him. God had promised to protect Israel. (Read over Leviticus 26.) Additionally, Israel worshipped many idols. That was prostitution as well.
The following are a few scriptures which show this relationship:
Hosea 1:2 (NKJV), “When the LORD began to speak by Hosea, the LORD said to Hosea: "Go, take yourself a wife of harlotry And children of harlotry, For the land has committed great harlotry by departing from the LORD.”
Hosea 2:2, 16, 19-20 (CSB), 2 “Rebuke your mother; rebuke her. For she is not my wife and I am not her husband. Let her remove the promiscuous look from her face and her adultery from between her breasts. … 16 In that day (during Christ’s 1,000 year reign on earth) — this is the LORD's declaration — you will call me, ‘My husband,’ and no longer call me, ‘My Baal.’ … 19 I will take you to be my wife forever. I will take you to be my wife in righteousness, justice, love, and compassion. 20 I will take you to be my wife in faithfulness, and you will know the LORD.”
The majority of Spiritual Israel (the church) also committed harlotry.
Revelation 17:3-6, 18 (CSB), 3 “…I saw a woman sitting on a scarlet beast that was covered with blasphemous names and had seven heads and ten horns. 4 The woman was dressed in purple and scarlet, adorned with gold, jewels, and pearls. She had a golden cup in her hand filled with everything detestable and with the impurities of her prostitution (her false doctrines and alliances with government) 5 On her forehead was written a name, a mystery: Babylon the Great, the Mother of Prostitutes and of the Detestable Things of the Earth. 6 Then I saw that the woman was drunk with the blood of the saints (remember the Inquisition and the many Protestant towns she slaughtered) and with the blood of the witnesses to Jesus. When I saw her, I was greatly astonished. … 18 And the woman you saw is the great city that has royal power over the kings of the earth."
When the Catholic Church joined with temporal powers, God called her a prostitute. Additionally, the “daughter” Protestant churches which seek alliance with any government are called prostitutes as well.
The true Spiritual Israel or Bride of Christ is a virgin. She turns to God and worships only Him. This thought is presented in Matthew 25:1-13 in the parable of the Ten Virgins. “Then shall the kingdom of heaven be likened unto ten virgins, which took their lamps, and went forth to meet the bridegroom.” Matthew 25:1.