 In the early 20th century, the problem of regulating prostitution according to modern European models was widely debated in Japan.During the Middle Ages prostitution was commonly found in urban contexts.Although all forms of sexual activity outside of marriage were regarded as sinful by the Roman Catholic Church, prostitution was tolerated because it helped prevent the greater evils of rape, sodomy and masturbation.