Do you have any script running in the backgound? Do you have some event like open document which can trigger action or script to flaten document? Take are look from File > Scripts > Script Events Manager.
Then my guess is that this file has no layers (anymore). If you say 'it's a regular JPEG', does that mean that the file extension is JPEG or JPG? JPEG does not support layers, so if you saved it as JPEG then you flattened it.