You have to remember that the msg.header.stamp field can be populated with whatever you want. In the case of a camera, it may be when the frame is recorded, or in the case of a laser, when the particular scan was recorded.
There may be additional steps (say an image pipeline), between the original time that the camera frame is captured, and when rosbag gets the message to be recorded. In this case, the data in the image represents the physical world at a certain time (msg.header.stamp), but has been received at a different time (time).