Exactly. The Coke that costs $1 in the store probably actually costs <10c if you buy in bulk! Let alone the $4 coffee from Starbucks!
Coffee - not as familiar with the economics of coffee, but of course dedicated machines will end up costing somewhat less than going directly to starbucks.
And most Cokes in a convenience store are now $1.50 or more, at least where I live.