I'm confused. Why'd he do this

So my ex left me in January 3 months pregnant with our 3rd baby, to go back to his ex, they also have 3 kids. But. Behind her back (and mine as I wasn't aware they where even together again) he was sleeping with me around eAster, and when I found out I informed her, and he left both me and my kids lives for 3 months. Anyways, from then until 5 weeks ago when our son was born he led me to believe he and her was still together, when our son was born he was down at hospital all over me and wanting me back, I told him no, thinking he was with her, he then phoned me that night saying she found out he was down with me and left him, and would I please take him back, hes been so unhappy with her the whole time, because he thought she was a chnaged women and she isn't and he can't get me out of his thoughts he loves me and what we had was real, bla bla bla. But, my grandmother knows his mum extremely well, and during a conversation last week she informed my granny he hasn't been with her in months. 😕😕😕 but, he knew that being with her, meant I wouldn't take him back, so why did he let on to be, while pretending to want me back. I can't make sense of this.