On the other hand, people who go to the church are more likely to give to charity, or participate in their community… It seems religion is doing some things right.
Charitable activity provides a lot of political cover for really shitty religiously motivated behavior. For example, giving money to the Salvation Army is probably a net-negative effect on the world.
It funds anti-homosexual political activity, attaches onerous religious proselytization to their poverty outreach, subsidizes in-your-face guilt-tripping bell ringers, crowds out other anti-poverty efforts, and reduces the charitable effort that donators bring to more worthwhile causes.
It's not literally the worst charity - that probably belongs to Susan G. Komen - but it is pretty terrible.
"Going to church" can be said to be a form of "Participating in their community", so this looks like it might be a tautology presented to paint church-goers in a positive light.
"Giving to charity" is not necessarily a good thing. Before giving to a charity, a person ought to skeptically evaluate the charity. Many charities exist to exploit our desire to feel good about ourselves while benefiting those who run the charity. People who don't apply skeptical thinking are easy targets.
If our goal is to use our money to make the world a better place, in some cases it may in fact be better to invest in a local small business than to give to charity.