If you volunteer at a food bank or similar you're giving your time to the cause. If you spend $5 on materials and 45 minutes to make something that is sold at a bake sale for $7 it probably makes just as much sense to give the $7 in cash. If you really enjoy baking and just want an outlet then by all means bake a cake and someone will enjoy it.
The key thing is the concept of adding value. If you spend an hour of time helping people at a charity you can see the value you add, even if you don't receive anything tangible for yourself. If you spend 45 minutes turning $5 worth of materials into a $7 cake then your 45 minutes has only created $2 worth of value, so unless you particularly enjoy the process of creating a cake it makes more sense to give cash than to give a cake.
Of course you could make a cake, share it with family and friends, and put $7 in cash in the box anyway. That way you get to enjoy making the cake, you get to enjoy eating the cake, and the church still gets the $7