I actually started of my working career as a factory worker (nightshift, 12 hour shifts, seven days a week). It was customary to bring along a flask of coffee and a packed lunch.
Right now, even though we have company-provided coffee, I'd rather they just give me the money to bring a flask of my own coffee.
It's more convenient, I get to make a trade-off between quality and cost as the situation calls for it, I get to switch coffees if I need to.
In current reality, though, you are correct - overall it's cheaper for the company to provide coffee instead of giving you the marginal cost of the coffee you consume. I just wanted to provide an alternative viewpoint.