You'd be surprised, but that is far from what the retailer pays. That may be what it cost Coke/Pepsi before delivery/marketing/etc, but is far less than what they sell it for wholesale.
Typical retailer cost is at or over $1 for a 2 liter. In fact, 20 oz bottles for single serve sale are nearly $1 cost. The mfg charges more for those as single sell units vs what they sell them to the retailer for in an 8 pack, for example, but it is against agreements to break open the multipack, instead a retailer must buy the single serve bottles.
2 liter on top, little margin, figure retailer pays $1 sells for below $2.
Unique sizes, like 8pk 20oz, 6pk cans, etc, which have the highest margin, in the middle.
Then 12 packs, slightly better margins that the 24 pack, but less than the unique sizes. Typically sells $4 or $5 regular price, typical cost $3.
Bottom the 24 packs, typically sell $1 or so below double the 12 packs, and the cost is slightly below double the 12 packs. Margin essentially the same or slightly lower than the 12 pk.
I promise you, bottled soda cost a retailer far over what it would cost to manufacture, or what it cost to dispense through fountain machines.