The story
From the notional similarity in behaviour: both (the pupil and prostitute) accommodate but do not react. In the case of the pupil, it is reacting to light; and in the case of the latter, it is to the client.
Etymology from Wiktionary, CC BY-SA 4.0.