Here is one example of what can happen when food isn't prepared appropriately and kept at a correct temperature. If it can happen to a licensed caterer, it can happen to a potluck or self catered event.
https://www.syracuse.com/news/index.ssf/2018/07/it_was_like_an_apocalypse_cny_bride_sues_caterer_after_guests_get_violently_ill.html