Of course, software people know that it would be tedious but technically straightforward to concoct a fake RAW file from another 'raw' format such as a PPM image. The stakes in these competitions can be quite high so it's a bit disconcerting that they rely on a presumption that converting RAW files to editable images is a one-way process.
Next level is to make it look plausible on its own, with plausible imperfections. This is a bit more involved and tedious.
The really hard part is to make it look like it came from the exact same individual purported camera body the photographer allegedly used. This is really hard.
An analogy would perhaps be taking a picture of a room:
Now, build another room that would make the same picture. Make sure everything in the room is plausible yet renders exactly the same picture as the first room. (The room is the RAW file.)
Edit: (I'm not saying all the competitions have the time and know how to verify a RAW file.)
Again, this is not about faking a RAW file from scratch, just being able to edit it in place.
On top of that, you have diffraction effects in the optics, chromtic aberration, and even some birefringence effects.
Algorithms exist which can detect if an image has been cropped, and what region of the original it came from. I'll leave as an exercise to the reader how that works :) hint: keyword is "media forensics"