Matthew 18 describes a graduated process when one disciple sins against another: private confrontation, then the involvement of one or two others, and finally the community. The presence of additional people is not merely a strategy for applying social pressure.
The wording recalls Israel's legal principle that a matter should be established by two or three witnesses.