First, these three groups were hostile to each other. They are all now on the same ground and they are needy. When a person turns to rely on God's mercy, he can no longer hate his neighbor. It is psychologically impossible to cherish the mercy God has shown to us and at the same time refuse to show it to another. Therefore one of the fruits that befits repentance is growing unity.
Repentance penetrates the ramparts that separate classes and races and cliques.
Therefore, the church, of all institutions, should be free of cliques of people which are uninviting to outsiders. The other thing Luke does by referring to tax collectors and soldiers is get Theophilus' ear. And Luke seems to be intent on keeping the dangers of power and wealth before Theophilus. And now Luke describes what John has to say to the rich tax collectors and powerful soldiers. Now he has Theophilus' attention.