Gonna try not to spoil cause even I forgot some details and I don't know what will connect the dots too early for you, but being a courtesan is a bit different from the outright prostitution you're probably thinking of. It still is, but the men would pay for all types of entertainment from music, to dancing, to playing strategy board games, and of course, sex. But purity (virginity) is also highly valued in this time period which can raise both rank and value, and that's why losing your virginity reduces it and getting pregnant instantly makes you worthless. A bunch of other things can cause this as well like anything deemed as a "mental illness" (like the sleepwalking case we saw in the earlier episodes), and STDs in general.
Courtesans can also be "bought out" though, meaning someone pays for the rest of their debt (often a man) and makes them their wife. Usually happens with customers that frequently visit the same courtesan and develop some type of relationship with them
The general problem with having your value reduced and/or having it brought down to nothing is that you're still a slave to the house that took you in, and you still have to pay a debt. So you cost less and nastier people with incurable diseases are able to sleep with you. It's very disturbing but knowing this will give you some deeper insight on what internal struggles some of these characters are going through