Why it compresses so well
AVIF is a still frame from the AV1 video codec, wrapped in an image container. Video codecs have received enormous engineering investment — every percentage point saved matters across billions of hours of streaming — and AVIF inherits all of it.
Where JPEG offers one block size and one prediction strategy, AV1 offers many: variable block sizes down to 4 × 4 and up to 128 × 128, dozens of prediction modes, and sophisticated filtering to suppress artefacts. The encoder tries far more possibilities and picks the cheapest.
That is also precisely why it is slow. The gain comes from searching a much larger space.