I mean this in the nicest way possible, but that you think these are, in fact, the real questions reflects a peculiar understanding of secular, Western jurisprudence and the (theoretically) liberal Anglo-American and European intellectual heritage from which it arises, or one that is dangerously at odds with the lessons taught by that heritage.

First, prostitution and extramarital sex are not logically related, per se. Yes, plenty of married men purchase the services of prostitutes, but that has never a reason for which the criminalisation of prostitution has been contemplated here. Married men also do plenty of other things at odds with the ideals of a happy, honest and open marriage. Plenty of divorced men and bachelors visit prostitutes. Even if they didn't, the essence of the criminality of prostitution does not lie in the peripheral aspects of the clientele's personal life or social position. It arguably leads to "worse" policymaking outcomes for politicians to sleep with DC escorts, but the reason why it is illegal is not _because_ they are politicians. It's just illegal in general. It may be officially censurable within the legislative profession for that reason (an arrangement involving a particular code of conduct into which the politician entered voluntarily), but not in background law.

Our entire system of judicial thought is reliant on the idea that the state identifies and prosecutes things that are logically related in ways articulated by the applicable statute, and that the evidentiary relationship between the alleged crime and the statute on which the allegation is based is a fairly deductive one. To the extent that it actually functions (another discussion for another day), it would very quickly break down if prosecutorial "inferential" leaps or "strong inductive" claims based on certain statistical generalisations without definitive proof or direct connection were permitted to be made. The reason we prosecute driving while intoxicated is not because the driver is some shade of likely to be an alcoholic, and therefore a mean-spirited jerk (because he's drunk) that offends his family or roommates, thereby detracting from the overall common happiness and public welfare.

The presumption of innocence absent proof of guilt, and the concept of probable cause are both intimately related to this; this is why it is unreasonable, as a matter de jure, to say that a Craigslist ad with an image of a scantily clad woman and a phone number and reference to a "good time" represents an offer of prostitution unless it contains an explicit quid pro quo offer of sex for money. The fact that it is quite likely as a statistical matter should not enter into the picture if we are interested in conserving our liberal legal principles, to the extent that we have them as yet. We don't arrest people who look like the sort of people that deal drugs without establishing conclusively that they have actually done so, and we don't, generally, arrest women on the street who are "probably" street walkers unless they can be witnessed to be making offers of prostitution per se, or, more likely, gotten on some other technicality of ordinance (loitering, accosting pedestrians, etc.). Walking around in a skimpy outfit and looking attentive to passing cars is not in itself illegal based on what you might be up to if you're doing that.

Second, our legal and democratic heritage does not admit the possibility that government is qualified to determine or administer the vagaries of personal life. The idea that the government is going to formulate--and mandate, and enforce!--an idea of a "good" marriage, which presumptively forbids X or Y, is rather abhorrent when considered against the backdrop of centuries of common law and democratic development. The government can grant a divorce petition, dissolving a marriage license that it itself issued, not make you have a good marriage. Furthermore, as you rightly point out, there is at least one identifiable constituency of married people whose concept of marriage explicitly accepts what others might deem "extramarital" sex. These social mores are always a moving goalpost, especially in a more globally connected, flatter world of more numerous subcultures. Trying to take one account of virtue or the good life and promote it to universal institutional imposition through coercive force is a woefully misguided endeavour philosophically and a doomed endeavour practically.

Third: Historically and jurisprudentially, the notion underlying the phraseology, the formulation of "promote the general welfare" is quite different from the one that you have ascribed to it. In principle, the mission to promote the general welfare has principally to do with protecting citizens from foreign invasion and otherwise defending the territorial and political integrity of the country, regulating things that can lead to loss of life or limb, and, more recently, mitigating possible sources of financial peril stemming from legal misrepresentation and/or fraud (e.g. scams, undecipherable financial instruments and investment vehicles, etc.).

The government is not--and has never been--in the role of enforcing or bolstering the subjective, psychological "quality" of interpersonal relationships, or mitigating the emotional harm from ones that fail to meet the happiness threshold of one or more parties. Yes, there is family court, but the state's interest in child custody issues and the terms of divorce stems from a relatively narrow, technical preoccupation with financially equitable outcomes, as they relate to the subsequent quality of life and opportunities of the child and both (ex-)spouses. The courts' role there deals with the material effects of what happens to the actors when the particular family unit does break down, not with the prevention thereof.

There are plenty of other relationships whose failure or compromise can also have deleterious effects: psychologically taxing collegiate or supervisory work relationships, friendships that go south upon the revelation of deceit or betrayal, etc. It's not the government's place to legislate away all conceivably problematic dimensions of human existence, nor particularly feasible from a logistical standpoint.

Getting the government involved in the question of adultery is a slippery slope; why not also police lying (outside the sphere of commercial law and/or tort law)? If extramarital sex is harmful to the family unit and unconducive to the public welfare, why not throw people in prison for it, or worse? Causing people grief or anger, or any other emotion associated with a frowny face is also injurious to the public welfare in the aggregate; it is relatively straightforward to show that a certain population of unhappy people lead to "worse" (that is, less socially appealing) outcomes than happy ones.

Unless you're interested in moving in the direction of despotic theocracies, these are not the the real questions.