Having worked at 2 different quilt shops, the shop buys the book wholesale (50% of listed price). Not sure about shipping costs. So you shouldn't have been charged for shipping because the shop should cover the shipping cost as the cost of business or they may not even get charged shipping (the distributor may cover that cost).
Either way, it was poor taste of the teacher to charge you shipping. The only reason I can think is that doing that is that the source of the book doesn't do wholesale! If that is the case, I would offer my students to buy the book from me or look online for a cheaper alternative. (And if you know me, I would be finding my students the cheapest way to purchase the book). Quilting is expensive and I want my students knowing that I'm trying to find them the best deal I can. It builds respect between teacher and student.