I watched a “How it was made” doc show, the cows actually decide when they want to be milked, they walk over and get in line.
They like it.
My understanding is that when the cows get full of milk they seek to get milked to relieve the pressure. They learn the pattern and routine.
They are not smart.
Last week I was in Alvin helping a friend replace 600 feet of barb wire fence. A baby cow came up and licked me. That has never happened before. The adults were kinda scary. Too big to pet. I was told to not be nice to them because they’ll lean on the fence trying to get attention after they are habituated.