The following is from the web page Luther, Exposing the Myth, under the heading "Marriage and Women":
"The word and work of God is quite clear, viz., that women are made to be either wives or prostitutes" [On Married Life].
Luther Exposing the Myth says their stated purpose is to show that "from Luther’s own words we shall see him for what he really was, that is a rebellious apostate, who abandoned the faith and led many into apostasy from God under the guise of “reformation” in order to follow his perverse inclinations." With this quote, they attempt to show Luther degraded women.
Luther, Exposing the Myth cites "On Married Life." They may have taken the quote from this secondary source. Notice the similarities:
Peter F Wiener may also be the source being used: "Nothing sacred about marriage Luther knows of. But what he has to say about women is still worse. 'The word and work of God is quite clear, viz. That women were made either to be wives or prostitutes' (W12, 94) [Peter F Wiener, Martin Luther, Hitler's Spiritual Ancestor]. The reference used by Luther, Exposing the Myth is inaccurate.The quote is not from "Of Married Life" but rather (as Wiener notes) from Luther's Commentary on 1 Corinthians 7, 1523 (WA 12:94 ; also in Erl. 51:6). The quote is found in the following paragraph:
In the English version of Luther's Works, the quote can be found at LW 28:5 (Luther's Commentary on 1 Corinthians 7).
This comment from Luther was written in 1523, in a treatise designed to defend Christian marriage against celibacy, and to promote the freedom to marry or not marry. Luther went through 1 Corinthians 7, one of the primary proof-texts used by those in favor of priestly celibacy. In fact, the treatise was dedicated to a friend's wedding, a wedding that Luther himself performed. Luther states his intention:
I have taken it upon myself to interpret the seventh chapter of the First Epistle of St. Paul to the Corinthians—this I do as a service to you and as an aid to all those who take a liking to it. My reason for this choice is that this very chapter, more than all the other writings of the entire Bible, has been twisted back and forth to condemn the married state and at the same time to give a strong appearance of sanctity to the dangerous and peculiar state of celibacy. And to tell the truth, none have given themselves such airs with this chapter as the very people who have been least chaste. I, too, once considered chastity as ordinary as they pretend it to be. But, thank God, the last three years have taught me how little chastity there is in the world outside marriage, both in convents and monasteries. But God has laid it upon me to preach about marriage and to tear the veil from the chastity which is of the devil, so that there may be less fornication and our poor youth may not be so pitiably and dangerously misled by falsely glorified chastity. Therefore I must take particular care that this chapter, which is their principal defense, no longer remain to cover their shame but be understood according to the true meaning of St. Paul.[LW 28:1]Luther presents the view he's critiquing:
These fellows view the state of marriage as a superfluous, presumptuous human thing that one could dispense with and do without, just as I can do without an extra jacket or coat. Then they fill the world with their foolish and blasphemous scribbling and screeching against the married state, advising all men against it, although they themselves feel—and abundantly demonstrate by their actions—that they cannot do without women, these being created specifically for marriage; instead they run after and plague themselves with whores day and night.. [LW 28:5]Then Luther identifies the specific person he's writing against: John Faber’s 1521 Opus adversus nova quaedam eta christiana religione prorsus aliena dogmata Martini Lutheri:
Of this kind is that arch-fool, Johann Schmid of Constance, that renowned whoremonger, who has written an immense book, recently printed in Leipzig, against the state of matrimony. He tries to talk everyone out of it but says nothing more than that there is much effort and labor connected with it, as though this were not sufficiently known throughout the world and as if this ass must first teach us what every village peasant knows. If I were chastity herself, I could think of no greater and more unbearable shame and disgrace than to be praised by such rascals, whoremongers, and enemies of chastity. They rail against us, charging that we are enemies of chastity and promoters of marriage who prefer to see men married; and we are to consider them extremely wise, though they cannot but devote themselves to incessant fornication and though they praise chastity with their pens only and defame the married state.. [LW 28:5]Luther then argues that God intended there to be marriage. God didn't simply create women in order for sex:
They are rascals, not only on the surface but in the bottom of their hearts, and they are unworthy of an answer. And what matter if the whole world were to complain about the state of matrimony? We see right before our eyes that God daily creates not only men but also women and maintains their lives; and yet it is certain that he does not create any woman for the purpose of fornication. [LW 28:5]Then comes the obscure quote:
But since God’s work and Word stare us in the face, declaring that women must be used either for marriage or for fornication, these heathenish pretenders should shut their blasphemous mouths and leave God’s Word and work uncriticized and unhampered; unless perhaps they would like to teach us according to their own famed sagacity and contrary to God that all women should be strangled or banished. This would make a fine fool of God: what He does is no good; what we do is well done. [LW 28:5]The point is that biologically, people are typically designed with the desire to procreate. In fact, "God's work and Word" prove this, and this desire can either be carried out in a God pleasing way (marriage) of a non-God pleasing way (fornication). Then in a hyperbolic argument, Luther suggests those who argue for celibacy might as well argue that women should be strangled or banished in order to maintain a celibate life because the desire for sex is so strong. This would be the only way to avoid unchastity.
Now therefore since God created woman that she should and must be with man, it should suffice us that God is on our side, and we should honor the married state as a divine and noble institution. And if the wiseacres do not want to enter it, then let them continue in their heathenish blindness to practice rascality and fornication so long as God may allow it. We have God’s Word on our side; that will remain and not be moved by such blundering Smiths, though they were more numerous than the sands of the sea. Still it is a great sin and shame that we Christians have become such great fools that we first have to ponder and decide whether women ought to be married or not, just as though someone should ask whether he ought to eat and drink in this life. [LW 28:5]Conclusion
It's interesting to see how far this quote has traveled in cyber space by a simple Google search. When one of Luther's most severe Roman Catholic critics, Hartmann Grisar defends Luther on this quote, it's a good sign that the quote is out of context. Grisar states,
One sentence of Luther's, which, as it stands, scarcely does honour to the female sex, runs as follows : "The Word and work of God is quite clear, viz. that women were made to be either wives or prostitutes." By this statement, which so easily lends itself to misunderstanding, Luther does not mean to put women in the alternative of choosing either marriage or vice. In another passage of the same writing he says distinctly, what he repeats also elsewhere: " It is certain that He [God] does not create any woman to be a prostitute." [source]