Mercury is almost perfectly tidally locked to the Sun. That’s why there is such a dramatic temperature gradient. Has nothing to do with atmosphere, because in our sense of the word it hasn’t got any.
Hardly "perfect:"
Mercury rotates in a way that is unique in the Solar System. It is tidally locked with the Sun in a 3:2 spin–orbit resonance, meaning that relative to the fixed stars, it rotates on its axis exactly three times for every two revolutions it makes around the Sun.
-Wikipedia
Regards,