Notice that it's different, though.
Para is a direct destiantion of the food.
Por , in this specific case, is an indirect destination. You probably cook "because of" the community or "for the good" of the community. You can force these meanings to end up the way you want, but I really think it's not a good idea to rely on "por", because in general it's completely different from "para".