An old saying from at least the 1930s. The idea is that guys shouldn't date girls who they have no intention of ever marrying. It comes from a time when marriage was a much more important goal for women (who could rarely earn money on their own)