Now there was a sinful woman in the city who learned that he was at table in the house of the Pharisee. Bringing an alabaster flask of ointment, she stood behind him at his feet weepingSomething that strikes me as interesting about the parable that Jesus tells is that both creditors are unable to pay their debts. In that regard, there's an extent to which it's immaterial that one debt is larger than the other. They might as well both be infinite. However, the knowledge that he's been forgiven a larger debt makes the one creditor more grateful than the other.
and began to bathe his feet with her tears. Then she wiped them with her hair, kissed them, and anointed them with the ointment.
When the Pharisee who had invited him saw this he said to himself, “If this man were a prophet, he would know who and what sort of woman this is who is touching him, that she is a sinner.”
Jesus said to him in reply, “Simon, I have something to say to you.”
“Tell me, teacher, ” he said.
“Two people were in debt to a certain creditor; one owed five hundred days’ wages and the other owed fifty. Since they were unable to repay the debt, he forgave it for both. Which of them will love him more?”
Simon said in reply, “The one, I suppose, whose larger debt was forgiven.”
He said to him, “You have judged rightly.”
In the real life situation, Jesus isn't confronted with just one sinner. All the people who he meets are sinners. However, because the Pharisee thinks of himself as righteous, he's not actively seeking forgiveness the way that the woman is. Both will need to be forgiven if they are ever to be with God. No person can win his way into heaven based upon his own virtues. God's grace and forgiveness are gifts. But only one of them fully recognizes this and asks for forgiveness, and she does so because she recognizes herself to be a sinner and thus has contrition.
I think this is also where the "Jesus always seemed to feel most comfortable around people society labeled as sinners" line of thinking goes clearly off the rails. In the gospels, we again and again see people who are widely considered to be sinners turning to Jesus to seek forgiveness, while people who consider themselves righteous often question him or ignore him. Jesus, for his part, requires only that people ask for forgiveness, and immediately grants their requests. However, when we hear the "Jesus hung out with sinners" argument now, it's usually in the context of arguing that what society labels as sin should not be seen as such -- that the people in question don't need to ask for forgiveness.
The sin of the Pharisees was pride. They didn't see themselves as needing Jesus, because they were sure they were pretty good already. In modern society, we seem to have two factions of Pharisees.
On the one hand, there's pharisaical righteousness, in which we identify ourselves as belonging to a group of 'basically good people' and congratulate ourselves on that.
On the other hand, we have pharisaical lowliness, in which we identify ourselves with one of the "out groups" which we imagine Jesus would have felt affinity for, and thus conclude that we are basically good people and congratulate ourselves that we're not like the righteous Pharisees.
Both of these, however, are wrong, because they miss the thing that really drew sinners to Jesus and Jesus to sinners: the fact that they acknowledge that they needed forgiveness and asked Jesus for it, a request that he was and is always ready to grant.