When we walk on a hot summer day we get heat in two ways.
a) Direct heat from the sun, and
b) Heat radiation from the hot surroundings.
So we feel very hot.
To get relief from this heat we prefer to go into the shade, where we get only heat from the surroundings.