Long ago they were used to pump oil into the hubs. People were obsessed with extra low friction in the hubs and, because of the oil, had to relubricate every time they rode. Campy came along and had to put oil ports on their hubs, and that made it gospel that they had to be there. Interestingly, when Campy came out in the 60's or whenever with Record track hubs, they omitted the ports, even though this was at least a less crazy place to use oil compared to on the road. Shimano came along and for years decided they needed to put ports in as well, although they dropped them after a couple product versions and no one cared. Suntour tried putting actual grease nipples on all kinds of XC gear (pedals, hubs, etc.) to simplify lubrication, but I never saw anyone use them. At least they were in the right places -- pointed right into the bearing areas. Campy made a big thing out of them -- part of the retro look. When they came out with their lower-end Tipo hubs and omitted the oil ports, people complained more about the ports than about other quality compromises. But did anyone ever use the ports? Noooooooo.
The right lubrication for a hub is a small amount of grease in the bearings. Too much and you just spin it out and perversely create more of a conduit for water or dirt to get in. Too little, of course, and you don't lubricate enough. Trackies tried using machine oil, and even removed the dust caps on the outside of the hubs so the bearings were fully exposed and could be flushed with a big squirt of oil, but this fad quickly disappeared. Hubs got trashed in a hurry, plus tracks outlawed it -- people would leave oil slicks on the track, which would lead to some interesting crashes. I'd just consider the ports a marketing gimmick and grease the hubs properly with a pair of cone wrenches. And of course, some hubs have grease ports along with sealed bearing hubs, which makes absolutely no sense at all. Tells you how smart manufacturers think we are.