If I want to take a picture out my sunny window, I'll naturally use a fast exposure and a narrow aperture setting on my camera, which lets only a short burst of light in – a little like the way the pupils of the eye contract in sunlight, so the bright light isn't so painful.
Naturally, the astronauts or satellites in space are going to do the same thing when taking pictures of sunlit objects, since it's just as bright up there.
Fast exposure times means they can get good pictures of the bright Earth or lunar surface, but it also means no stars in the picture. Even in space, stars are relatively dim, and simply don't produce enough light to show up in photos set for bright sunlight