This aphorism, brutal and unsparing, is most often directed at
a young woman who has decided to live with a male Significant
Other, instead of, or prior to, getting married.   Most often, the person delivering this insight is the young woman's mother.   It is (usually) delivered with the intention of awakening the young woman to her situation, by likening it to that of a dairy cow, the mammal most often used to represent women in a variety of uncomplimentary analogies.   The reference to a docile, naive, unsuspecting bovine is thinly veiled.
Although the analogy is frail - "buying the cow" in this instance being a euphemism for marriage, and "milk" of course, is sex; what modern, self-respecting woman would connive to withold sex in order to goad her partner into marriage? - it is not without validity.   Men, especially young men,
are known for their inability to acknowledge the inevitable - that they will age, that their time to father will pass, that they will one day no longer attract women of child-bearing age.   Young men often assume that time spent with a pliant, consenting female is inconsequential, unworthy of consideration; for worlds, conquests, affirmations lie ahead of the impenetrable now.   There will be more women after this one.
So although the words are hackneyed, unsubtle and common they
should not be taken lightly by the young woman.
Especially if the mother is cool.