It's because there is something in between them if you look at it from a 3D model scale, that something is the earth, and that picture, the earth is in between, the moon and the sun, at least a portion of it, and what you're seeing is that portion covering the moon.