Origin of the ring ellipticity in the black hole images of M87*