It’s kind of complicated. It has to do with how your eye works.
There’s tiny point in the very center of the back of your eyeball called the macula where there are gazillions (that’s a highly technical medical term) of cones and rods (eye cells that detect points of light, sort of like pixels in a digital camera). That’s why you can see the shape of something more clearly by looking straight at it than off to the side (for example, try looking just slightly away from some writing and try to read it. You can’t! That’s because only your macula has the resolution to see in such detail.)
On the other hand, the cells on the edges of your vision can see fainter light, even if they lack the resolution. That’s why you can see faint lights out the “corner of your eyes” that you can’t see by looking directly at them (this also explains people seeing “ghosts” and other paranormal phenomenon).