A nenki boko job system;
The term nenki boko can mean “indentured labor” and this habit was practiced often before World War II in Japan. Nenki boko meant that people worked for their employers on a contract basis.
They, the workers would work for a fixed number of years, then be free to work on their own.
"Indentured Servitude" in the 18th century in the British colonies:
The employer made a contract with the worker or, his or her parents instead of the sea captain; he did so because he needed labor and the worker or, his or her parents did so they needed conveniences and/or money. Until the late 18th century, indentured servitude was very common in British North America. It was often a way for poor Europeans to immigrate to the American colonies: they signed an indenture in return for a costly passage. After their indenture expired, the immigrants were free to work for themselves or another employer.
Indentured servitude - Wikipedia
However, a nenki boko job system in Japan also enables workers to gain a license to practice in a regulated profession. Most of their training is done while working for an employer who helps the young workers learn their profession, in exchange for their continued labor for an agreed period after they have achieved measurable competencies. Nenki boko usually began at ten to fifteen years of age, and would live in the master craftsman's household or the marchant' one. Most young workers aspired to becoming master craftsmen or managing marchants themselves on completion of their contract.
In the case of geisha girls before WWII, the girls should apply the job by themselves and the employer, okiya lets the girls learn artistic accomplishments, the reading and writing, and the basic education. The employer, okiya is handling all those expenses including the cost of basic necessities of life (as food and shelter and clothing). So if the girl herself or someone wants to be released earlier from her service, she/he should pay the money to cover remaining costs for enterprise on their contract basis.
We can find that almost same system is working in Japan nowadays, sumo wrestlers' training system. If you want to be a sumo wrestler, you join a sumo stable. The master of the sumo stable is handling all expenses for your necessities of life until you become a junior grade wrestler called 'juryo' who earns his living.
They, the workers would work for a fixed number of years on a contract basis, then be free to work on their own. That is a nenki boko job system in Japan.
In the case of comfort women before 1945, the women should have applied the job by themselves, or if not, the parents of their daughters (The person younger than 18 years does not get prostitute ：By the promulgation of the prostitute control rule of 1900((娼妓取締規則（明治三十三年十月内務省令四十四号）))) entered into an agreement with prostitution brokers (they were called zegen in Japanese at the time) who advanced a chunk of money to the parents, and their daughters had to work as prostitutes until they earned the advanced money paid to their parents. Afterwards, they were set free.
Usually it took several years, mostly five to seven but during the war it took a year or two and surprisingly some earned over a million dollar a year.
Madame Butterfly was purchased at 100 yen by Pinkerton, Lieutenant in the United States Navy in the opera. This "100 yen" was the money to cover the remaining costs including the loss of profits in the term of her contract.
Madama Butterfly - Wikipedia