Not everyone buys candy bars, but they stick them at the register because some people do.
Some people come in and sit and read magazines (although most now are covered in plastic) and leave. Others come in to browse, find something that they like, and then buy it.
You wanted to know the purpose behind the idea. The purpose is to drive traffic. You want people in your store. That’s the idea.
Pity for the Bay Area, though. They're going to lose eleven Borders stores, including two in San Francisco.