Since always. The bookstore is a service the University provides to students. I'm not saying the textbooks aren't cheaper online or that the bookstore is some model of efficiency, but saying there's some scrooge in the back room thinking up new ways to screw students is naive.
Textbooks are expensive because publishers can get away with it, the professors effectively making the purchasing decision don't actually buy a textbook and thus have an incentive to prioritize quality and completeness over cost, and because the information textbooks contain is costly to compile (all those data tables in the back of engineering textbooks aren't free). The cheap books you get online are either sold directly student-to-student, are some sort of clearance deal, or are international editions and thus have less gouging by the publisher built in.
It also helps that the online store has lower overhead than the university bookstore, but that's just the nature of the beast and not some plot to screw you over.