Text edges stay sharp
JPG compresses in 8 by 8 pixel blocks, which works well on photographs where colour changes gradually. Black text on white paper is the opposite: an abrupt jump from dark to light at every letter edge. JPG cannot represent that jump cleanly, so it leaves a faint halo of grey speckles around the letters. PNG stores the pixels exactly, so the edges stay clean no matter how far you zoom.