If the astronaut was using a soviet crew module, then they wouldn't even need to come back to earth, since they all come with rifles in the landing craft. Officially, the reason is in case the capsule lands in a wilderness area where hostile wildlife (bears, wolves, etc) could be a threat to the crew while they wait for rescue.
But we all know it's really because moon ghosts.
But we all know it's really because moon ghosts.