Accidental iMessage recordings happen on other people's iPhones, too. When I grumbled about this on Threads, I got dozens of replies from people who were also constantly accidentally recording.
Instead, computational photography typically underexposes the shot, and, more importantly, captures multiple images of the same scene. Those images are combined to reduce noise and other issues, producing a higher-quality image.