How it compresses
PNG works in two stages. First it filters each row of pixels, replacing each value with its difference from a neighbouring pixel — so a smooth gradient becomes a long run of near-identical small numbers. Then it runs DEFLATE, the same algorithm a ZIP archive uses, over the result.
That design explains precisely which images PNG is good at. Flat colour, repeated patterns, sharp edges and text all produce long predictable runs after filtering, and DEFLATE collapses them dramatically.
Photographic noise produces nothing predictable at all, which is why a photograph in PNG is enormous. It is not a failure of the format — it is the format doing exactly what it promises, on content that offers it nothing.