in voluntary charity, there is no guarantee that other people are going to contribute as well

if you contribute and others don't, it's just a drop in the bucket, and you'll just be out of money

in taxation, everyone has to contribute, so a collective fund is guaranteed, and there is a guaranteed benefit