jpg (and other pixel image formats without layers capabilities) have pixels, but they do not have pixels hidden behind other pixels.
I think there was a famous case where someone »redacted« pdfs by inserting black rectangles – in a vector format like pdf any number of objects can lie atop each other and keep on existing, so people were able to remove the bars amd read the texts.
In a flat pixel image the pixel you see is it, there is nothing behind it.