He said: "I came not to call the righteous, but sinners to repentance." (Luke 5:32 king James version). Repentance means that someone recognizes that they have been living in sin, and then they quit sinning, and do their best to live according to how God want's them to live (following his ways, laws and rules). So Jesus is making it clear that he does not like sin, he likes repentance.
Many who like to remain in their sins, and also many Christians who have been confused about what Jesus did in his time think and teach that he preferred sinners, and that's why he hung out with sinners, and got mad at the elders / temple leaders. However, saying that Jesus preferred sinners is like saying he preferred hell (where he teaches that sinners go) over Heaven (where he teaches that the righteous go).
We need to remember that "For all have sinned, and come short of the glory of God" (Romans 3:23 king James version).
Jesus preferred the men and women who accepted him, repented of their sins, and became his disciples. After all, those are the ones who he chose to travel with, live with, teach, empower and save. These people then lost the title sinners, and became saints.
As Luke 5:32 documents, Jesus says he came to call sinners to stop sinning, and change their lives to God's ways and follow Jesus. So when he went somewhere and sat down to eat or talk with a group of sinners, that is what he was doing. And when he was there, they would shut up, and listen. After they listened, they made a choice to either to stop sinning, and follow Jesus, OR to stay in their sins, and not follow Jesus. It's not like he kept going back over and over again to hang out with his friends the sinners. He was not friends with sin, he was the enemy of sin. He did not prefer sinners, he did not want them to be sinners, he hated sin and that's why he was teaching them to quit sinning.
For additional reading, check out one of our most popular articles called: Jesus Christ Hung Out With Sinners.