It would be cool if the food that was cooked by a volunteering passer-by (or a few of them) would then be offered for free to other passers-by until someone from the crowd would agree to cook again and the process would continue. It would also make an interesting show to watch, such circumstances would definitely encourage conversations between strangers stopping to see what's going on.
While people stand at the "bar", eat the free food, and chat someone from the cooking team or the staff responsible for the show would ask if anyone is willing to cook the next meal. People having enough free time and some cooking skills as well as wish to do it would sooner or later come forward. There would also be a big banner hanging, saying "come cook with us". In case the cooked food is over and no one was willing to cook, the initial staff of the show would cook until they find the next volunteers.
To have enough food to feed those who cooked and say at least 10 passers-by or more you'd have to make big pots of it, so perhaps the best would be to gather a team of at least a few volunteers that would collaboratively work together. Because the workforce of passers-by would feed other passers-by the show organizers would only have to provide products for cooking, water, and some energy to heat the stove. The volunteers would need to cook from products that are provided. It would be best if all the products were vegan so that the food would be cruelty-free.
Such a show could be a part of some global/local initiative addressing a social problem, like "food not bombs" or similar.