or if we are talking about heating/cooling properties, sidewalks, depending on their composition can offer greater warmth or cooling properties that would help regulate body temperatures.
Or if it's in the rain, sidewalks or anywhere "elevated" or sloped would work to their benefits. Their air holes "sphericles" are on their undersides (bad design) and they could suffocate by drowning in water. Particularly in the ground where they could get clogged by mud. Hence, the extensiveness of most ant nests. Or elevated ones...
Also why one sees earthworms wriggling OUT of the mud during the rain...