Idk what you think is going to turn bad after 4 hours. It’s still cold from home for some, or most, of those hours. Lunch meat is highly preserved. PB doesn’t need refrigeration. The jarred mayonnaise in egg salad actually helps to preserve it a bit, and the jarred mayo itself doesn’t need refrigeration for moderate periods of time. Until not that many years ago, mayo jars didn’t even advise refrigerating after opening. Eggs spoiling in a very short time is more a concern with raw unshelled eggs than it is for cooked eggs
Presumably people know to either use an insulated lunch bag or not bring highly perishable foods in a Mediterranean climate.