suggests that
an undesirable or inferior means may still satisfy an urgent need; historically, the saying was often used disparagingly about sexual desire and choice of partners.
He pursued a casual affair with someone he scarcely knew, without any real affection for her. “Dirty water will quench fire.”