I cannot for the life of me see why my theology professor recommended secrecy about such a thing. Secrecy could easily be far worse than honesty. In fact, secrecy could be a terrible occasion of sin. If you got away with it once, why not a second time, huh (says the devil)?
It's not a matter of recommending secrecy, it's a matter of recommending prudence. Each couple is different so their personal journeys through something like this would be different and we'd be here forever if we tried to delve into each possible scenario.
One thing is constant however and that is the catastrophic repercussions that occur in such a home, family and marriage. Some people cannot handle these situations, period. Maybe you can or think you could, but the reality is that many cannot. That's why there is a call, not for secrecy, but for prudence. The bottom line is that no one is obliged
to reveal these sins. That doesn't mean they can't or that the marriage couldn't benefit in the long run by recognizing and correcting problems, it just means they don't have
to and are cautioned in doing so. Many times if adultery has occurred, the marriage is rocky anyway and this would be the last straw, whereas with prudence it might have made it through the rocks and gone on to thrive.
It may be a shocking thought at first but upon reflection, it makes sense. The children, the home, the marriage are infinitely more valuable than the confession of that sin to the spouse (confess to God of course). To destroy a family because we FEEL like we have to get it off our chest is like giving Satan a freebie. But again it really depends on circumstances and the individual couple, whether or not they can handle it, whether or not it's a chronic issue or a one-time deal, the ages of the children if they have any, whether the spouse was already suspecting or not etc...
The world wants to know and takes polygraphs etc.. but that's because divorce is an option for them. Most of the time adultery is a deal breaker but they don't see the sacred institution of the marriage, family and home like we do. Most often they want to know so they can proceed with a divorce. This is not our view. Or it shouldn't be anyway. I'm not saying that's what you have in mind in wanting to divulge an affair, I know it isn't. But I'm highlighting why we hear about "honesty" to such an extreme that hearing about prudence is shocking to our modern sensibilities.