What the... so i was being a nerd and researching the guild's act and it turns out that, along with like, 30 other professions (Including Ratcatchers, Weavers and Alchemists) they created a Prostitute's Guild.... jesus!
I imagine that their thought process was, "well, it's going to happen. People will use the service, so we may as well make sure that they know what they're doing".
Make sure that they're actually good at it
Make sure that they won't spread disease
Make sure that they will be protected and won't be taken advantage of
It's perfectly historical and there are examples in many examples in various countries today.
You wouldn't want to buy a sword from a blacksmith that hadn't undergone an apprenticeship, why would you want to pay good money for someone that doesn't know what they're doing in the sack? 😉
Of course, if you'd rather your hookers to be forced into sexual indentured service, to be riddled with diseases and to be completely inept at being able to give anyone a good time, then by all means, go freelance and avoid regulation. 😉