In chapter four Barnabas had given a large amount of money to the church. It was the talk of the church as well as the whole city. Everyone was talking about it, because Barnabas was a true man of God and set the example for the others to follow.
Then in chapter five Ananias and Sapphira probably thought this is a good way to get attention for themselves. I believe it was their pride that caused them to lie about the giving. The amazing thing is that they did not have to lie because the money they gave was a promise and not a required amount.
Their promise was to give some money from land they had sold. They gave less than their promise and lied to the Holy Ghost about it. The end result was that God killed them for lying about the amount they had given.
They did not have to make the promise but chose of their own free will to do so. The service must have lasted quite some time, because God killed Ananias three hours before Sapphira.
In verses 5-11 fear came on all them that heard these things.
Why did God kill them? In the Old Testament it was always a sin to touch that which was holy. The word holy is synonymous with sanctified, and it does not mean perfect or without sin. It simply means to be set apart for a particular purpose.
Illustrate: with pulpit, piano and pews are sanctified – set apart for a particular purpose.
Even the pastor of the church is set apart for a purpose, even though he himself is not perfect either, and God’s call is without repentance. Holy means sanctified for the Lord forever.