I see. Yes it might sound strange. For me 本屋で本を買うためにいきます。is more like "I'm going to buy a book at the bookstore, while 本屋に本を買いに行きます。 is ”I'm going to the bookstore to buy a book." when I think about it, which has a slightly different emphasis right? 1. The action, and 2. The location.