Note here that the sin was not that Ananias and Sapphira kept some of the money for themselves. The sin was that they were pretending to give all the money to the church: “When it was sold, was the money not at your disposal?” They wanted accolades and praise while succumbing to greed and deception. Since the Holy Spirit indwells believers, and believers make up the church, they were testing the Spirit by lying to Him. Unfortunately for them, that same Spirit revealed to Peter exactly what was going on!
Peter says both “why has Satan filled your heart to lie to the Holy Spirit” and “you have not lied to people but to God.” Most theologians believe that Peter is equating the Holy Spirit with God here, and this points to the reality of the Trinity. One God, existing in three persons: Father, Son, and Spirit. Of course the Spirit would know what was going on!
Why was the penalty so harsh? This is apparently the first time something like this happened, and God deals with it immediately and with force. This is another indication that God’s presence is in and with the church. And he seems to be in and with the church is a special way at this time. The end result is that “great fear gripped the whole church and those who heard about these things.” The apostles continued to proclaim the gospel and display God’s power. People who believed joyfully joined them, while those who may at one point have pretended to be a part of their number stayed away out of fear (“none of the rest dared join them“). Nevertheless, the apostles were held in high honor, and people acknowledged the good they were doing by actively bringing people to be healed. Note that even though they brought people out so that Peter’s shadow would fall on them, it doesn’t say that they were actually healed! This is just another way that Peter and the apostles were held in honor.
The Christian church today often prays for revival. We want the signs, miracles, and conversions! But, as one author put it, “in the church where the lame walked liars died.” God’s power is not displayed without His holiness, and if we aren’t prepared to live in His holiness, we’d better fear rather than seek His power.