Layers and history are not the same thing.
PDF is a vector format. Picture elements are geometric figures which are to be "painted" successively in a precise order, so that newer figures hide parts of older ones. This is not per se a trace of how the image was edited, only an artefact of the way things are drawn in PDF. It is not equivalent to typing Ctrl-Z on a Word document to perform some "undo" commands. But it still means that in the scenario you allude to (trying to "black out" some part of the picture), the naive editor may believe that he destroyed the information while he merely hid it.
(Anecdote: I did have, at some point, the job of "anonymizing" PostScript documents submitted by researchers in a review process. The submission guidelines specified quite clearly that manuscripts were not allowed to include any identifying element, but the grasp of mundane realities by researchers being what it is, quite a few of the manuscripts featured the name and institution address of the author. The solution involved adding an extra white rectangle over the offending area and editing the image so that the author name read as a bunch of 'X' even if the rectangle was removed.)
In bitmap formats, the picture is made of elementary pixels which are juxtaposed, and which do not hide each other. When you modify a bitmap picture by applying a black rectangle on them, the colour previously held by the pixels is forgotten, not merely hidden. There are a few bitmap formats which handle "layers" and thus could potentially have the issue you evoke (depending on how the black painting is done), but the common bitmap formats (including JPEG, PNG, BMP and GIF) do not have layers, and when you paint some pixels in black, information is gone for good.
With the GIMP, a free wannabe replacement for Photoshop, you can see the image layers, and when you save to a format which does not support multiple layers, you get an explicit warning that layers have to be "merged" -- which means that hidden pixels are eradicated.