Where people are in community with one another conflict arises. Unfortunately, churches don't always follow the Holy Spirit in times of conflict and so problems escalate. In this story of the first church the Holy Spirit had control and the results were miraculous.
God is a multitasker. In the story of Ananias and Sapphira not only was God protecting the church from hypocrisy, but He was building a deep sense of profound respect and awe in all who saw it and heard about it. This character trait was needed in the community of believers.
As the community continued to form in Jerusalem in response to the work of the Holy Spirit, Satan made an attempt to insert two wolves into the sheep fold through the most unlikely circumstance. God's grace covers the protection of his sheep as He leads them to green pastures.