What it is good at
JPEG was designed for photographs, and it remains excellent at them. It exploits two facts about human vision — that we resolve brightness better than colour, and coarse shapes better than fine texture — to discard information nobody misses.
The result is a photograph at a tenth of its lossless size with no visible difference at normal viewing. Thirty years of newer formats have improved on that by 25–50%, which is meaningful but not revolutionary. JPEG got the hard part right first.