That’s odd, I always thought they just added a custom chunk to the PNG data, or even just stuck it in one of the predefined “textual information” chunks. But maybe they found messing with the pixmap easier than messing with the PNG encoder.
I also expected this, and was surprised when I read otherwise.
That was my original thought too. But ancillary or private chunks will likely get stripped by various image tools, file sanitizers, etc. Embedding the data in the pixels themselves stands a better chance of not getting filtered out.