@Crim It's actually not uncommon for children to be sold to brothels or even born into them. They basically act as servants and clean up everything and when they get old enough they start servicing others. Brothels are also different from picking up a prostitute from the street, there is a degree of standards and many of them actually pride themselves in having prostitutes that are clean (be it either diseases or drugs). It's quite literally the difference of buying illegal drugs off the street for cheap against the legal drugs that have quality control.
@Crim
In regions where prostitution isn't prosecuted, it's normal for prostitutes to keep their children in the same place where they worked. It's better than the prostitutes throwing their children away. The children didn't always become prostitutes but those that did, already learned the trade early from listening on their mothers and the other prostitutes. In regions where prostitution isn't prosecuted, prostitutes are generally respected and valued. Second generation prostitutes usually became courtesans instead of just a sex toy.
Just because there are children in the brothel doesn't mean they are used as prostitutes as well. There are plenty of jobs that children can do, such as laundry, general maid duties, taking care of the younger children, buying supplies, or drawing water from the well or river. It's only when Christianity started criminalizing prostitution that brothels have such bad rep. There is a reason why prostitution is called the oldest profession on Earth.