A typical medieval public bath, actually a place of prostitution
How prostitution in the Middle Ages was seen ?
In principle very bad, but in fact much less.
sexuality out of wedlock it was considered sinful and therefore always wrong, but with the passage of time we became more tolerant (and hypocritical) towards the "oldest profession in the world", judged a sort of necessary evil which you could not do without.
The reasons were mainly two:on the one hand, prostitution was used to control the lowest sexual instincts and to avoid rape, numerous and even justified if the victim was a woman of humble origins, on the other hand it was useful to dissatisfied husbands, given that the moral dictates of the time, even in the marital sphere, were decidedly rigid and provided for many days of abstinence during the year (for example during Lent).
This explains the great diffusion, between the fourteenth and fifteenth centuries, of equipped and apparently innocent public baths, within which brothels were actually concealed with lots of rooms, beds and expert "masseuses" (see https://www.pilloledistoria.it/3279/medioevo/i-bagni-pubblici-nel-medioevo-luoghi-pulizia-incontri-proibiti).
The evidence was clear to everyone, but we were content to keep these places away from sacred buildings and, even better, outside the city walls.
It goes without saying that the indulgence granted to unsatisfied husbands, or that they considered themselves as such, was not equally permitted to their spouses, whether satisfied or not, certain distractions could be forgotten.