You see this most clearly in the Parable of the Prodigal Son. As many a preacher has pointed out, the story isn't really about the younger son. The story is about the older son. The murmuring that kicks off the parables of the Lost Coin, Lost Sheep, and Lost Son was:
Now the tax collectors and sinners were all gathering around to hear Jesus. But the Pharisees and the teachers of the law muttered, “This man welcomes sinners and eats with them.”
The parable isn't about the prodigal but this attitude Jesus is facing, the attitude embodied by the older son when the younger son returns home:
“Meanwhile, the older son was in the field. When he came near the house, he heard music and dancing. So he called one of the servants and asked him what was going on. ‘Your brother has come,’ he replied, ‘and your father has killed the fattened calf because he has him back safe and sound.’
“The older brother became angry and refused to go in. So his father went out and pleaded with him. But he answered his father, ‘Look! All these years I’ve been slaving for you and never disobeyed your orders. Yet you never gave me even a young goat so I could celebrate with my friends. But when this son of yours who has squandered your property with prostitutes comes home, you kill the fattened calf for him!’
“‘My son,’ the father said, ‘you are always with me, and everything I have is yours. But we had to celebrate and be glad, because this brother of yours was dead and is alive again; he was lost and is found.’”
We see Jesus addressing this hostility throughout the gospels, this accusation that the grace Jesus was extending was premature and unfair. It's this perception of unfairness that Jesus directly attacks in his Parable of the Workers in the Vineyard. You'll recall the set up, how the owner sends people out into the vineyard to work at staggered hours throughout the day. Some have been working all day, others have just arrived. But at the end of the day everyone is paid a full day's wage. This provokes the predictable outrage from those who've worked the whole day:
So when those came who were hired first, they expected to receive more. But each one of them also received a denarius. When they received it, they began to grumble against the landowner. ‘These who were hired last worked only one hour,’ they said, ‘and you have made them equal to us who have borne the burden of the work and the heat of the day.’
This is the older brother's compliant in the Parable of the Prodigal Son, a resentment that Jesus' practices of welcome were effectively cancelling all the effort they had devoted to Torah observance. The compliant of the workers in the parable--"you have made them equal to us"--was the complaint being leveled at Jesus as he "welcomed sinners and ate with them."
The Pharisees are often portrayed as legalists who embody a "works-based righteousness." People who were trying to "earn" their salvation. But this is mistaken. Jesus' problem with the Pharisees, in light of his mission to gather the lost sheep, was how they had come to use Torah piety to fracture and scatter Israel. Jesus didn't rebuke Torah observance directly, but he did chastise how it was creating sociomoral divisions within Israel.
Torah piety created these divisions in two related ways. On the one hand there was preening pride and a thirst for public recognition. On the other hand was a revulsion and refusal to associate with the unrighteous. (I might have written a book about that.) That the Pharisees often failed to meet their own standards raised another charge: hypocrisy. Throughout the gospels Jesus attacked all three of these--pride, judgmentalism, hypocrisy. And the point to underline here is how these weren't tied up with a "works-based" or "merit-based" vision of salvation. The point was primarily social and corporate, how these dynamics were causing the "older brother" (the Torah observant) to refuse to participate in the celebration of the recovered "younger brother" (the sinners Jesus was welcoming).
Simply put, in regathering the lost sheep of Israel Jesus' mission wasn't simply "welcoming sinners." Jesus was also attempting to reconcile the righteous to the unrighteous, the older brothers who were refusing to celebrate the return of the prodigals.