It's hard to tell for sure what happened after the marriage fact has been deleted and re-entered, but I have a pretty strong suspicion. I suspect that the marriage fact was shared with person 497 and was not shared with person 502. You can do that if you wish, but it's not something you would normally do on purpose. I can't picture how it might have happened by accident. But for example, is it possible that this data came into your database from ancestry.com via TreeShare or anything like that? Or have you been playing around with shared marriage facts? Or did you maybe import these people into your database from some other RM user?
No matter how it happened, the way to resolve the problem was probably to click on the "main" marriage fact and then to click on the Share button in the Marriage Details panel towards the lower right of the Edit Person screen. Within the shared fact dialog, you should have seen that person 497 shared the fact and person 502 didn't, so you could have clicked the Remove button to remove the sharing of the fact from person 497 without removing the fact itself.