there were a lot of active prostitutes at the time which everyone was fucking and nobody was marrying. contrary to popular opinion on /pol/ you did not get a complementary tradwife and house back then just for being alive. the economy had its ups and downs and the general notion, at least in the cities, was that you didn't marry until you had the means to support a family. since the amount of active businesses in the city was strictly regulated by the guilds, you basically had to wait until an established citizen died and you either inherited his stuff or married his widow. as a result there were a lot of bachelor apprentices and laborers waiting for massah to die and a lot of young women who were forced into prostitution because they could not find an established man to marry. since jacking off (onanism) was considered a serious moral failing, the church conceded that it was better for everyone who wasn't married to be fucking prostitutes than be a bunch of blueballed incels wishing death upon the married citizens, and for the women to have an income of some sort rather than turn to even worse crimes.  since it seemed entirely unfair that women forced into prostitution and doing society a crucial service keeping all the young men gratified should be doomed to be social pariahs on top of all that, pope innocent iii came up with the aforementioned solution.
Germany