In Acts 8:1, we read of a terrible persecution of the church in Jerusalem. They fled. They could flee because they had sold all of their real estate and most of their personal possessions. They were in effect packed and ready to leave.
This is the background of the decision by members of the Jerusalem church to sell their real estate and hold some (not necessarily all) of their money in common. There is no record of any other church in the New Testament period that did this.
Common money was entirely voluntary. Ananias and Sapphira sold their real estate, kept some of the money in reserve, and handed the rest over to the leaders of the church for use in the church. They told the leaders that they were giving all of their money. They made a big show of this. God then made an even bigger show. He killed them. But Peter made it plain to Ananias that their money had been theirs to keep. Their sin was in lying about the percentage (100%) of their gift (Acts 5:4).
It is also worth noting that the Jerusalem church was the most poverty-stricken church in the New Testament. Paul took up a collection throughout the European churches on behalf of the Jerusalem church (II Cor. 9). Common property has a tendency to produce poverty except in extraordinary circumstances, such as in monasteries.