The simple answer to your question is the camera settings used to take most photos from the Moon weren’t designed to capture stars.
Apollo astronauts used film cameras, so to
understand the answer, we need to explain a little bit about how camera
exposure works. Film is a light-sensitive emulsion over plastic. When that
plastic is exposed to light through the camera’s lens, a chemical change
produces a negative image of whatever is photographed.
But the amount of light isn’t always the same.
A photographer has to consider the lens aperture and shutter speed, both of
which control how much light hits the film. A smaller aperture means less
light, as does a faster shutter speed. It’s almost like how your pupil
constricts on a bright day and dilates at night: Your eye automatically adjusts
your aperture so that you can see in different conditions.
A photographer also has to consider the most
important part of the photograph before setting aperture and shutter speed.
Generally speaking, the brighter the target object, the smaller the aperture
and the faster the shutter; otherwise, too much light will hit the film, and
the photo will be dominated by a washed-out, overexposed focal point.
Let’s say you’re Neil Armstrong photographing
Buzz Aldrin during a bright lunar day. Buzz (in his spacesuit) and the lunar
surface are going to be the brightest objects in your shot. So for him to be
visible, you want to choose a fast shutter speed and a smaller aperture. The
result is a clear image of Buzz, but other light sources, like the stars, are
too dim to leave an impression on the film.
Because the most important things the astronauts photographed were each other and the Moon’s surface, their cameras were set to capture them in focus — not the dimmer, distant stars. But there are some images where you can see stars in space. Apollo astronauts left the camera’s shutter open longer during some photographic experiments. The results show pinpoints of light behind the bright, fuzzy blobs that are the overexposed Moon or Earth.