Mobilizing an entire nation to answer a king's call often involves a degree of reluctance or coercion, but this event was a rare exception [ביאור שטיינזלץ]. The true significance of the moment was not the physical wealth collected, but the pure intention behind the giving [מלבי"ם].
The people rejoiced because their contributions were offered with a complete and undivided heart. They gave from a single, unified inner desire rather than a conflicted one, meaning there was no sense of shame, social pressure, or obligation driving their actions [רש"י]. Usually, when someone donates without full willingness, they feel a lingering sadness over the loss of their money. In this case, however, the people experienced nothing but joy [מצודת דוד]. In fact, this profound happiness was considered even more valuable than the donation itself, as it proved that their offerings to God were completely free of ulterior motives [חומת אנך].
Witnessing this, King David also rejoiced, and his happiness exceeded even that of the people because he was the one who initiated the entire campaign [רש"י]. He drew immense satisfaction from watching the people step forward to continuously give from their own resources [ביאור שטיינזלץ]. He understood that giving with a whole heart is the true way to find favor with God [מלבי"ם].
Beyond his initial satisfaction, David's joy had a deeper layer. Those who collect charity and encourage others to donate can sometimes inadvertently cause a sin if they pressure people into giving more than they can afford. When David looked at the people and saw their genuine happiness and eager participation, he realized that his fundraising effort was entirely free of coercion or wrongdoing. He rejoiced in knowing that he had been the catalyst for the fulfillment of multiple acts of devotion. He had not only facilitated the physical donation but also the great joy of performing a Commandment, which is a significant Commandment in its own right [חומת אנך].