When you think of where you're going to buy your next car, Costco Wholesale (COST -0.12%) likely doesn't come to mind, but the warehouse retailer has quietly become the nation's second-largest car seller. 

Costco's auto sales have doubled since 2008 to 400,000 a year, growth that comes as nationwide car sales have been relatively flat. Perhaps unsurprisingly, Costco has leveraged its reputation for excellent customer satisfaction into an arena of retail that's known for its opacity. Many consumers hate the haggling that often goes into car-buying as well as the other mysteries shrouded in the process. Costco, which is known for its no-frills, buy-in-bulk model, has already earned its members' trust for selling high-quality goods at rock-bottom prices, and now it's taken much of the agony out of the car-buying experience by putting fixed prices on all vehicles.

Costco doesn't sell vehicles directly, but instead works through an auto-buying service called Affinity Auto Group to negotiate the lowest prices for its members. And similar to its standard retail business model, Costco makes no profit on the car sales, using them instead as yet another perk to drive membership sales. A majority of Costco's profits come from selling memberships, which start at $55/year, rather than through retail sales as it sells its goods nearly at cost. And carmakers, who were skeptical at first, seem to be adapting to the model as Costco's size and image make it an attractive partner. Aside from the perks it offers members, there are a number of strategic benefits to Costco's play in the auto market.

1. The auto market is huge and fragmented
In 2013, the last year for which data is available, new car sales in the U.S. totaled $737 billion, and they were growing fast. New car sales make up about 15% of total retail sales in the country, and are a bigger category than essentially every other, including grocery, gasoline, general merchandise, and restaurants and bars. Any retailer who is able to grab a piece of that market would be foolish to pass it up. Some analysts projected car sales to reach 17 million this year, a new record, which means 17 million Americans will be looking for a deal on their next car. With negotiated prices, no-haggle policies, and its reputation as a consumer favorite, Costco is in a prime position to make those sales. In addition, the opportunity to save money on a new car makes the $55 membership fee seem like a no-brainer. Further, the fragmentation of the auto dealership industry only makes it easier for a nationally known retailer like Costco to benefit. 

2. It's Amazon-proof
With its buy-in-bulk, membership model, Costco may be less vulnerable to the antics of Amazon.com (AMZN -1.65%) than most brick-and-mortar retailers, but one of the best ways to fend off the e-commerce juggernaut is by entering a retail category that can't be co-opted by the virtual world. No matter what machinations Amazon has up its sleeve, you'll never see a car arrive at your doorstep in a smiley-faced cardboard box. 

Autos are one of the few categories where physical retailers have an innate advantage over online sellers. Car-buyers generally prefer to test drive vehicles before purchasing, and even if they are purchased online, a delivery is not so easy to facilitate and is often costly. Costco, with its national network of stores and dealer partnerships can connect customers with their new wheels anywhere in the country. Amazon can't do this.

3. It's a complementary business
Not only does Costco sell cars, but it's also a major seller of gasoline. Over two thirds of Costco's 663 warehouses have gas stations, and the low prices it offers on gasoline are also a major selling point for memberships as Costco tends to undercut area gas prices by 6 to 12 cents in order to encourage visits to its stores. It's hard to say exactly how much Costco's gasoline sales contribute to its overall top line. Costco does not break out its gasoline sales, but rolls them into a group it calls Ancillary and Other, which also includes pharmacy, food court, and optical, and makes up 17% of sales.

The same customer that is looking for cheap gas is also likely interested in a cheap car when the time comes to buy a new one, so Costco's strength in each area simply reinforces the other. 

As Costco's car sales grow, it may not only find itself with more members but also with increased leverage to raise membership fees, which for investors may be the biggest reward of the auto program.