A few more thoughts.
Coffee could conceivably been brought up to Bree, the Shire hobbits obtaining it through that market.
Or a traveler, addicted to coffee, could have visited north and made his/her own substitution for the drink, dubbing that ‘coffee’. Neither readers, narrators nor hobbits would be the wiser.