The benefit is you get the freshest milk possible less than a day old, from a cow you can visit and see that it is being treated well. And since its your neighbor you can ask what they feed the cow and say no if they are feeding them newspaper or other shit.
The downside of course is you have to live on or close to a farm, or in my cousin's case be in a country where its totally normal to have animals in your yard in the city. (City outskirts to be clear, 10 minute drive to the city center from his house if that.) I got on the roof once when I visited and saw over the wall his immediately next door neighbor's hogs.
About the risk: yeah its risky but humans have always drank raw milk until very recent times and still do in many parts of the world. You don't drink or sell milk from a sick cow or if the milk doesnt pass the smell test. Drinking raw milk is risky for most people because we live in packed cities and get our milk from factory dairy farms that could be hundreds of miles away or more, and the industry has evolved around the idea of let the animal be unclean, let the animal products be unclean, and then deal with sanitizing the dirty animal products. Milk gets aggressively pasteurized killing the bad bacteria but also the good. Meat (chicken mostly) gets bleached with chlorine. And there's color preserving injections all over to both make the meat heavier by volume and keep it from changing color through natural processes like oxidation. Have you ever seen natural pork be pink for more than a few hours after its been exposed to the air? The ham is a sham.