Jesus told his disciples, “unless your righteousness exceeds that of the scribes and Pharisees, you will never enter the kingdom of heaven” (Matt 5:20), and beginning in Matthew 5:21 he illustrates what he means. The Pharisees had an external “righteousness” (if it can be called that), but Jesus shows that a deeper righteousness is what sets his people apart. His people know that their relationship with God and others is fundamentally a matter of the heart.
In Matthew 5:21-48 Jesus talks about six subjects of great moral and practical consequence: anger (5:21-26), lust (5:27-30), divorce (5:31-32), oaths (5:33-37), retaliation (5:38-42), and love (5:43-48).
Only the first and fourth sections begin with the full phrase “You have heard that it was said to those of old” (Matt 5:21, 33), which indicates that the six subjects divide into two triads: anger, lust, divorce, and then oaths, retaliation, love.
The second and third subjects are related because of the themes of sexual immorality and adultery (see Matt 5:27-28, 32). The fifth and sixth subjects are also related because of the themes of loving and responding to an evil person (see 5:39, 44).
The last verse of the whole section (Matt 5:21-48), “You therefore must be perfect, as your heavenly Father is perfect” (5:48), sums up all of 5:21-48, not just the sixth subject of love.
Throughout Matthew 5:21-48 Jesus is showing what he means by his earlier claim, “Do not think that I have come to abolish the Law or the Prophets; I have not come to abolish them but to fulfill them” (5:17). If his hearers don’t understand that real discipleship must start in the heart, they may conform only to the deeds of scribes and Pharisees and thus never enter his kingdom.
If the heart is neglected, God is not fooled, and we will not love others as we should.
An island comes through the surface of water, but the visible land is not all there is; more is underneath, supporting the island, giving it shape. In Matthew 5:21-48 Jesus takes subjects which, on the surface, seem clear and easy enough to obey. But as he brings them up, he points to what is underneath. He is after the attitudes that hold up and give shape to acts of righteousness.