You are correct, they are added for quick reference and to keep study uniform.
The direct context following verses 21-47. Here Christ goes beyond the letter of the law to the heart of the law. Here He lays out the law, and goes even further to tell us that we missed what goes back to (in my opinion) Gen 4: 6-7.
There, before the law, God says sin is crouching at your door due to the anger. In Matthew, Jesus goes beyond the law of Thou Shall Not Murder, to do not be angry with your brother.
In laying out both the law and heart of the law, Christ finishes with being perfect as God is perfect.
To me this ties is how we all fall short and are sinners before a Holy God.