Walmart and Costco both sell everyday goods at low prices, but they make money in different ways. Walmart earns a thin margin on a huge volume of sales. Costco keeps its markups very low and relies on membership fees for much of its profit.