When you see them all piled up, its not due to companionship; as stated already its competition for the same spot, and quite possibly in stores there are no good spots available so they try to use each other as a hide.
Its hard to keep from giving snakes emotions we are used to seeing in other animals. Survival for them has depended on them being alone, and that is how their instincts tell them to live. I do believe that as they grow and develop mentally that they do feel more then just fear and hunger (especially with larger snakes), however their emotions cannot be compared to that of a social animal which requires its pack or herd for survival. Instincts tell snakes to live for itself, to do what it needs to to survive; for other animals it tells them to stick with the pack or herd to help them all survive. Snakes do not feel love or companionship or obediance, nature wont give them feelings they dont need. In my experiance though, they do feel trust, safety, comfort, and respect to an extent, even with an ability to bond. You must learn to think like a snake to be able to understand it.