You
milk cows in the
morning, quite
early. For this you bring them
indoors. You
milk them again in the
evening, quite
late. For this you bring them
indoors. In between those times, the cows are often
outdoors, eating
grass. So as to make the milk, you see.
Therefore, til the cows come home means until you bring them in for the evening milking. All day, basically. And hence, a long time.