I won't say that it *cannot* happen; we live in a vast and chaotic universe.
But it's not a malfunction that I've ever seen for a controller to simply switch to PROG mode or REMOTE PROG mode spontaneously.
I *have* seen operators change the controller mode with a keyswitch or keypad. Or programmers do it remotely, by accident or on purpose. Or major faults that were immediately cleared by a power cycle that led to the controller powering back up in PROG mode. Malware could do it but I've only seen that twice and one of them I wrote.
Is there any sort of pattern or context to the controller being found in PROG mode ?
The MicroLogix 1400 uses the keypad to control RUN/REMOTE/PROG mode, and it's not removable, so if you want to reduce the possibility of a manual mode change, you will need to set a keypad password (User Manual, page 117).
You should check out which mode the controller is configured to go into after a power cycle (User Manual, Page 95), and can examine the Auto Reset feature (User Manual, Chapter 8).
I've seen a controller FAULT, which will change it's mode for sure, but RUN to PROG mode? Is something in your code writing to S:1/0 - S:1/4? That is CPU mode.
If the PLC has S:1/8 set to "1" AND S:1/12 is set to "0", AND it is going through a power cycle following some fault that self-clears, that could explain it.
Otherwise it is probably what Ken or thehoneybadger said.