I don’t think that Christ endorsed sin by associating with sinners.
Sinners who see the love of Christians are more likely to recognize the error of their ways and seek the fulfillment that a relationship with Christ can bring.
Neither did he pat the adultress on her head and tell her it was ok.