I have often wondered the same thing! My solution has been on occasion to grow indeterminate cherry tomatoes, lettuce, and spinach indoors during the winter and hottest months.
I have also had success growing spinach and lettuce during the heat of summer in a raised bed or containers that are shaded during the hottest period of the day.
I am growing lettuce in one-gallon Root Pouches in a shaded area on my deck here in East Tennessee...clip off as needed. So far, so good.