Our society, which glorifies individual autonomy and responsibility, recoils at the thought of innocent people being punished for wrongs committed by another. In ancient times, leaders of families, tribes, or nations served as representatives of their people. Both success and failure belonged to all. It is entirely possible that David had consulted his advisers beforehand and they had agreed to his plan, making the census a corporate decision.
This principle of “the innocent suffering for wrongs committed by another” is still true. Because God designed us to live in relationship (families, friends, neighbors), our actions always affect others, either positively or negatively. To borrow the body analogy used by Paul in 1 Corinthians 12, when one small part suffers, the whole body hurts.
1 CHRONICLES 21:14 – 14 So the Lord sent pestilence upon Israel: and there fell of Israel seventy thousand men.