The whole law encompasses the entire will of God. To break any part of it is to infringe on that will and therefore become guilty of sin, to become a sinner in principle against each individual law and the intent of the whole law. Even under human justice systems, a person becomes a criminal by breaking just one law.
God's law goes beyond physical infractions of rules. For instance, when He directs us to love our neighbors, He does not ask us to like the way they are. He expects us to give them forbearance, patience, and help when needed. Passing by a beaten man lying in a ditch on the road to Jericho may not be legally wrong, but it is unloving (Luke 10:25-37). Thus, a person doing so is guilty of far greater spiritual sin. He does not love his neighbor as himself.
“You shall love the LORD your God with all your heart, with all your soul, and with all your mind.” This is the first and great commandment. And the second is like it: “You shall love your neighbor as yourself.” On these two commandments hang all the Law and the Prophets.
If we want to be part of God's glorious Kingdom, we must face our guilt and overcome our sins.