Why an economics textbook? The authors were trying to illustrate 1) the role of substitutes on consumption of a particular good - there was no TV, no bridge club, no women except prostitutes to go out with, so heroin "cornered the market" on recreational activities, and 2) the fact that people will adjust consumption of almost any good in response to its changing price - heroin was incredibly cheap, so people took more of it.
Anyway, I always looked skeptically at claims that trying it once guarantees addiction after that.