These kinds of scenarios are more common than you think. I see them all the time in practice: an "innocent" opposite-sex friendship on the part of one spouse begins to drive a wedge between a married couple. Yet instead of prioritizing the marriage and ending the friendship, the married partner defends their friend.
It all began as an occasional after-hours and work-related text from one of her husband's female co-workers. Soon, the texts began to come more frequently, often late at night. Then she found several naked pictures that the female co-worker had sent to him.
I often hear people say that their partner's affair or request for separation came "out of the blue" and that they had "no clue" their partner was that unhappy. Yet when the situation stabilizes a bit and they're able to look back with the clarity of hindsight, they usually admit that there were little cracks beginning to show.
And what you can do to confront your partner.