In Egypt a man had one main wife, but as many secondary wives and mistresses as he could afford. With such readily available sexual partners, the Egyptian male found no need for a prostitute. The rich had access to slaves and travelling groups of dancers and musicians - always a good source of sexual favours. The poor lived in communes and shunned the idea of marriage altogether.
The Hebrews in Biblical days also allowed the man as many wives as he could support. King Solomon supposedly had over seven hundred wives. Then the Hebrews started worshipping one God as opposed to many. They discovered they were the "chosen" people to bring this new message to the world, and to prove it they instituted a number of sexual practices and prohibitions, starting with circumcision to show Gods preference for their race. Likewise the Jews began to impose monogamous standards in part as a way to ensure the purity of the race and the multiplication of the "chosen ones".