Mammals produce milk for their offspring. Dairy farmers have to keep their dairy cows pregnant and having babies constantly so they continue producing milk. This involves bulls inseminating the cows or more commonly non-consensual artificial insemination. Either could be considered rape. I guess an ethical farmer could only choose to opportunistically collect extra milk at times when their cows have given birth and after the calf has drank their fill, but that’s not how it happens at large dairy farms.