To put it in a bit of perspective:
In ancient times, when armies went to war and conquered a city, poor discipline could lead to the army going on rampage and burning, looting, and raping their way through the conquered city. This was called a sack. While large-scale sacks mostly died out after the 1800s (for instance in the wake of the Sepoy Mutiny), it was still a major concern for the public images of many governments, not the least of which was the Japanese. The Japanese had already had their image tarnished in the First Sino-Japanese War, when Japanese troops massacred Chinese civilians after sieging Port Arthur.
To combat this, the administration had the "bright" idea of setting up government mandated prostitution for the troops. The idea was that by giving the troops a legal, government-controlled avenue to vent their sexual frustration, this would minimize their need to go around raping and killing innocent civilians. Meanwhile, the prostitutes would be able to earn money to pump back into the Japanese economy. Win-win, right?
The problem was that, as with most things run by the Japanese government at the time, the management of the comfort women program-not least due to the socially conservative views of the ruling government-was at an arms distance and more or less uncontrolled. A very small amount of actual volunteers for the program led to coercion, informal "selling" of daughters, and outright kidnapping and trafficking. In the conquered territories, Chinese and Korean women were often impressed into the service, or lied to, saying it was a factory that needed workers or the like. There were many more Chinese and Korean women serving as comfort women than Japanese women: this partly contributed to a Japanese comfort woman being more expensive than Chinese or Korean ones.
After the war ended, in preparation for the American occupation, the Japanese government, fearful of American soldiers running around raping Japanese women (especially their blue-blood, aristocratic daughters), organized a similar institution, the Recreation and Amusement Association, this time recruiting primarily poorer Japanese women with the promise of food, money, and shelter, as well as with Yakuza intimidation tactics and the aforementioned lying and kidnapping. This association was shut down within the year, but it should be noted that after the association was shut down, the number of rapes under Allied occupation increased significantly.
Serious question: Did Comfort women really exist?