Sorry @Gloeveryday but that would be it for me. His reason for telling you was completely selfish, and in no way meant to help you.
He reminds me of my friend's husband who used to keep a pin on his phone, and a combination on his briefcase, and a password on his email that she didn't know. So she couldn't look at anything. (Not that she wanted to.)
He'd make a big issue of it all, and said 'don't get prying and spying...' He went on about how well he got on with a particular women at work too. He'd come home with 'gifts' she has bought him, and made a hoo-har about it, and said 'no need to be jealous.' 
Basically, he wanted her to THINK something was going on, to make her jealous, and keep her on her toes.
Your DH seems like this. He wants you to know, because he is pissed off that you didn't find out. He WANTS you to know he had an 'affair,'
so that he can feel important and special, because this woman wanted him.
Have you been friendly with another man recently? Or have any men being showing an interest in you? It's quite common for insecure and jealous men to create scenarios where other women want them, and are interested in them, and they suddenly become close with another woman (and exaggerate their friendship.)
It may not even be true. If it is, why tell you now? Telling you now is spiteful, and cruel, and nasty.