Jpeg files can include a thumbnail image, along with the camera/software metadata.
Sometimes the thumbnail doesn't match the full-size picture (because it wasn't updated after editing, or because of shenanigans).