Lampropeltis triangulum turns up in barns and milking sheds because those buildings hold rodents. Farmers who found a snake near the cattle and a short milk yield the same morning drew a connection, and the name stuck across several centuries and languages.
Every step of the mechanism fails. Snakes have no lips or muscular cheeks and cannot generate suction. Their recurved teeth would cause a cow to react violently to any attempt. A snake's stomach capacity is small relative to a milking, and reptiles do not produce lactase in useful quantity, so milk is a poor food. No case of a snake feeding from a live cow has been documented.
The milk snake's more interesting property is mimicry. In parts of its range the red, black and yellow banding closely resembles the venomous coral snake, and rhymes for telling them apart are widely repeated. Those rhymes are only reliable for the coral snakes of the southeastern United States and fail elsewhere in the Americas, where the band order differs.
