Every ship had a ship's store and soda machines. The profits from those operations funded the Welfare and Recreation Fund. The ship's store was a counter-service operation on smaller ships and a walk-in store on larger ones. In the 1980s, cassette tapes, both blank and pre-recorded were big sellers. So was junk food, which the Navy called "geedunk," for reasons that nobody really knew. Personal service stuff, such as toothpaste, combs, shoe shine stuff, small uniform items (such as ship's ball caps and belt buckles) were among the items carried.
The biggest seller, back in the day, was cigarettes. When the ship was out in international waters, the sales were tax-free, and the cigarettes were known as "sea smokes". They were cheap. Really cheap. As in twenty-five cents a pack or two-fifty for a carton. Even in port, the sales were free of state taxes. Normally that was not a big deal for East Coast ships, as states such as South Carolina or Virginia did not have high state taxes on cigarettes.
Wise supply officers would overstock the ship's store prior to visits to some lesser-developed nations. Privileges to use the ship's store were extended to personnel at the local US embassy or consulate; they sometimes descended on the ship's store like a cloud of locusts. That made the supply officer and the XO very happy (the XO ran the Welfare & Rec committee), but it tended to piss off the ship's company.
A real fight sometimes ensued when ships were in overhaul. Shipyards all had canteens and/or "roach coaches"; cigarettes were a major part of their sales. Some ship's captains recognized that it was in their best interest to make it possible for the yard workers, known as "sand crabs" or "yard birds", to be able to buy sodas from the machines as well as smokes and geedunk from the ships' stores. First off, it reduced the time that the yardbirds took on breaks, so more work was done. Second, it really boosted the profits to the Welfare & Rec Fund. Some ships put soda vending machines right next to the Quarterdeck so all of the yard birds would know where the machines were.
That pissed off the canteen operators, especially in the Northern shipyards. They had to charge state tobacco taxes, so their cigarette sales took a serious beating. At least one shipyard complained to the local state tobacco authorities, who, knowing they did not have jurisdiction over Navy commissioned warships, referred the matter to the Naval Investigative Service (NIS). The NIS would send an agent or two to try and "talk sense" into the Commanding Officer and ask that sales of cigarettes and geedunk be restricted to ship's company only.
Many COs complied. More than a few, though, asked the "well, what if I don't" question. The answer was that if the civilian cops found a yard bird with a pack of untaxed cigarettes, they could arrest him, but there was nothing that could be done to the CO. The COs then would agree to only sell one pack of smokes at a time to the yard birds and that was the end of the matter.