Most RAW files include a thumbnail for easy preview without having to process the image. It is not full resolution and is heavily compressed, so you don't need to really worry about the space consumption.
Without it, nothing that doesn't know how to process RAW files would be able to show what the file contains.
Ultimately, it is up to the camera if it uses the thumbnail itself or renders the RAW data using the stored settings for display on the camera though. Some camera models also support doing custom RAW processing right on camera.
I suppose you could presumably hack a raw file to include a different thumbnail if you wanted to test the exact behavior of your camera, at least provided that that much of the RAW file spec is publicly known.