First off, Jesus quotes directly from the Talmud, something accredited to several rabbinical scholars, but is found in far more ancient traditions all over the Ancient Near East. It’s the Golden Rule, which the Talmud states in the negative: Avoid doing to others what you find hateful. The quote says this is the core of the Torah, and the rest is just commentary. Jesus states it in a positive form.
What may not be obvious at this point is that Jesus is poking once more at the Scribes and Pharisees about hypocrisy. While the pithy statement can run in several different directions, the primary thrust in this context is at hypocrisy, that it’s contrary to everything in the Scripture. Nobody is exempt from the full demands of the Covenant; no shortcuts.
The next two verses continue in the same vein. Matthew chooses Greek terms describing the path of justice as confined because of obstacles. It’s that way on purpose. What most people fail to grasp here is how this echoes His use of the image of inspection gates found on some ancient walled cities. It’s the old “eye of the needle” figure of speech, but stated here in different terms. You can’t drag all your special exemptions and pet sins into a Covenant life. You have to unpack your baggage and get rid of your special demands. There’s not much room to pass into shalom beyond just your humble self.
Cling to your fleshly considerations and you won’t even find the narrow gate. You’ll end up carried along by the crowd of those who refuse to repent. The broad and easy path makes no demands, and takes you away from God’s Presence. He is merciful, but forgiveness requires penitence. When the Messiah comes to establish His domain, the gate will be confined and narrow, calling everyone back to the full intent of the Covenant.