Discount warehouses buy in bulk and can set the price at whatever they wish, even as loss leaders to encourage store traffic.
By "online" did you mean the Online TurboTax website to prepare a return, or the purchasing of a desktop product (CD/download) from the TurboTax store? In either case, the Costco Premier is likely cheaper. So it does pay to shop.
The Premier product at Costco is a desktop product (CD/download). It is more fully featured than the Online Premier (i.e., the website version.) It has Forms Mode which the Online version does not have, and it does not have the form limitations that Online Premier has. The desktop product also includes a state program (in the Online version, a state return is an extra 36.99). The desktop version can prepare multiple returns, while the Online return can only prepare 1 Federal return per account per year.