Yes. It works where it is legal and regulated. It creates jobs for many people in the community, including health care. Regulated brothels are a much safer way for these exchanges to take place than on the street.
It is legal in some areas, but it has consistently been found to be a gateway vice: other worse vices grow wherever prostitution is tolerated. It's locally restricted in 99% of the counties/cities of America.