Bringing prostitution into the mainstream would allow doctors to treat prostitutes and administer contraception. Many prostitutes do not use protection because they cannot afford it and they are too ashamed to get it for free from charitable organizations. If prostitutes work in designated, legal areas, medical professions could administer HIV tests and give out condoms for free.
The medical community does not want prostitution legalized because it would spread diseases among the public. Although legalization would require prostitutes to go to the doctor and get a clean bill of health before going to work, it is not an accurate way of staying safe. These tests are usually sent out for a couple of days before the results are received. There will also be time between doctor visits where diseases can be spread and contracted. There is no 100% safe way to keep society disease free even when precautions are taken.