According to 1 Kings 3:16-28, two prostitutes came to Solomon for a judgment over their dispute concerning a child.
Then two prostitutes came to the king and stood before him... Then the king answered and said, “Give the living child to the first woman, and by no means put him to death; she is his mother.” And all Israel heard of the judgment that the king had rendered, and they stood in awe of the king, because they perceived that the wisdom of God was in him to do justice.
If prostitution was illegal (more specifically, if sex outside marriage is condemned by God), why were they willing (perhaps even comfortable) coming to the king and admitting to be prostitutes?
One of our assumptions must be false. Which ones?
So, what's the explanation?
In fact, one of the highly voted answer in this site, claim that sex outside marriage is never prohibited at all.
There is no evidence that pre-marital sex is an instance of porneia, nor is there any prohibition of responsible pre-marital sex stated in Scripture. Is premarital sex πορνεία (porneia)?
I need factual answers. For example, if some says that prostitution is illegal but by God's grace, prostitutes deserve justice and come to Solomon, then I would need to see more evidences. Perhaps, some historians could tell that prostitution is indeed illegal during 2500 ago in Israel with penalty of stoning or what, etc and somehow the Solomon didn't punish the prostitutes that come to him despite knowing full well what their jobs are. I wonder if it's likely?