I think the dust bathing cools them down because the dirt is cool. If you dig down a cm or so below the surface it's usually cooler than on the surface.