puzzled

Passages that I think I understand, but upon reflection, realize I actually don't: Matthew 5:17–20 ESV

“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. For truly, I say to you, until heaven and earth pass away, not an iota, not a dot, will pass from the Law until all is accomplished. Therefore whoever relaxes one of the least of these commandments and teaches others to do the same will be called least in the kingdom of heaven, but whoever does them and teaches them will be called great in the kingdom of heaven. For I tell you, unless your righteousness exceeds that of the scribes and Pharisees, you will never enter the kingdom of heaven.”

and...

Acts 5:1–11 ESV

“But a man named Ananias, with his wife Sapphira, sold a piece of property, and with his wife’s knowledge he kept back for himself some of the proceeds and brought only a part of it and laid it at the apostles’ feet. But Peter said, “Ananias, why has Satan filled your heart to lie to the Holy Spirit and to keep back for yourself part of the proceeds of the land? While it remained unsold, did it not remain your own? And after it was sold, was it not at your disposal? Why is it that you have contrived this deed in your heart? You have not lied to man but to God.” When Ananias heard these words, he fell down and breathed his last. And great fear came upon all who heard of it. The young men rose and wrapped him up and carried him out and buried him.

After an interval of about three hours his wife came in, not knowing what had happened. And Peter said to her, “Tell me whether you sold the land for so much.” And she said, “Yes, for so much.” But Peter said to her, “How is it that you have agreed together to test the Spirit of the Lord? Behold, the feet of those who have buried your husband are at the door, and they will carry you out.” Immediately she fell down at his feet and breathed her last. When the young men came in they found her dead, and they carried her out and buried her beside her husband. And great fear came upon the whole church and upon all who heard of these things.”

I sense I have an understanding of the broad strokes, but when I get focused in on the details of the text, I find bits that don't seem to fit.