All this in turn took its place inside a larger cultural context. The Edo-period world of licensed prostitution was composed of an elaborate hierarchy of women whose sex was for sale. Those at the top were as celebrated as movie stars are today, while those at the bottom were simply streetwalkers. Geisha were registered separately from all of the above, on the theory that their job was different. When this system of regulated (and legal) prostitution was finally dismantled in 1957, geisha were technically not affected because, in the entire history of the profession, geisha were never licensed as prostitutes per se.
But that does not mean that geisha were Shirley Temples. Under the table, geisha did compete with courtesans and licensed prostitutes, which is why the feudal government had to issue edicts continually demanding that geisha keep their proper place. Their job as gei-sha, literally artistes, was to entertain the courtesans and their clients as singers, dancers, and providers of sociable banter. Geisha were not supposed to make arrangements to meet clients for sex on their own, although clearly many of them did—otherwise there would have been no need for the barrage of edicts. In the end, however, sex with a geisha has seldom been a straightforward, purely economic exchange, and I would venture to guess that this was part of its appeal. Under historical conditions in which marriages were arranged for family considerations, while prostitutes (ranging up to the rank of courtesan) were available for purchase, geisha offered the possibility of that rarest of commodities, romance.