They do this to stay warm in the winter months - communal hibernation allows them to survive conditions which, on their own they would succumb to. This occurs not only rattlers but hognose, gophers and a variety of other snakes.
The majority of boids are from warmer climates and do not need to resort to this survival tactic.