There are many different models of Cool Bags on the market, both inside and outside of fishing. There may be cheaper, camping style options, but a purpose made bait cool bag will be able to stand up to the conditions it will face when out fishing.
Maggots, like us, will sweat when they get too hot. Maggots, unlike us, cannot have a wash to get clean. Keeping maggots cold in hot weather will make them last longer and work better when you need them to.
Foil lined material will insulate the contents from the outside and keep bait fresh in the cold of the ice blocks.
Of course, these bags will insulate your bait against extreme cold in the winter too.
If you're not bothered by it, you can even put your lunch in there if you want to...