It was legalized to buy and sell slaves. This auction house in Baiyes was allowed by the kingdom to operate. It was not an illegal business. Not only in this country but in every country in Seerian.
There were just strict procedures for selling and buying sub-humans. But it was not that hard to process because most sub-humans had distinct looks from normal humans.