Coffee itself is high margin, but the coffee business is not a high margin business.
You have to employ people to make coffee manually, and quickly. You have to buy a machine to aid them in this, and keep it in good maintenance.
Additionally, you have to supply perishables like milk to go in the coffee.
You have to keep them in your shop buying coffee, or incite them to buy coffee here when they're hungry instead of going to go to dunkin dounuts.
You can do this with nice decor, or by placing yourself in an already attractive location, or taking a margin loss on selling bake goods in order to bring in coffee customers.
In any case, your high margins for coffee product have rapidly vanished.
Coffee prices in the US are odd. 'round here (Southern European country) we pay less than a dollar for a coffee. Well, except in Starbucks, but then again, that's my point.