The Boundaries of Eros (by Guido Ruggiero)
is set in Renaissance Venice and examines the society's view of acceptable sexual conduct while maintaining the fabric of society. The main sources are court records of the various sex related crimes. Occasionally augmented by diaries and details of dowry prices. At the time Venice was a city state concerned first with the Goninan threat and then later from the Turks as each struggled for economic and military superiority. The defence of its maritime empire was exhausting in terms of men and money. While the navy were state employees the land forces were always mercenaries. A victory cost money in pay a defeat cost territory so the Venetians were constantly being taxed. The plague tended to occur frequent intervals which was seen as an act of God for decent too far into unnatural and decadent practices. The first wave of the plague, circa 1340, removed a third to a half of the population.
Venice offered incentives for economic migrants to come to the city to work and repopulate. While improving the economy this did little to support the family structures or male-female ratio.
City states are highly centralized where the government will do its utmost to keep law, order and stability. While the economy might be capitalistic and open to free market forces the government was prepared to bring every other aspect of society under its control. The migrant influx and economic disruption that goes with disasters, the plague, was diluting the ability of the extended family to maintain sexual discipline, the family structure and a sense of community. Taking a quote from the book:
"Adultery, fornication, rape, homosexuality and other sexual acts labelled criminal threatened the stability and order of family and community  because they undermined society's most basic institutions...