This was done to protect the animals. During the bombings in the years of World War II, many cities didn’t have electricity, so it was really dark. But after the electricity was turned back on, many animals were hurt in accidents near roads and unfortunately, many of them died. But the solution was simple: just paint the cattle white. It was easy to see white in the dark and nobody would run over the cows.