My XH was a shitty husband and father. When we first got together I thought he was great. Everything changed when I got pregnant. Guess he thought he had me where he wanted me. So he started showing his true colors. I didn't realize just how horrible of a person he was until he walked out. I'm sure some of that had to do with me taking off the rose colored glasses.
Recently, I thought about something my XMIL told me when I was pregnant with my son. She told me to make sure I put my XH on the birth certificate. We weren't married at that time and he had to sign a form saying my son was his.
Back then she had a friend who had to go to court to get a paternity test for her child because she hadn't put the child's father on the birth certificate and she had to get proof of paternity before the state would go after CS.
She said that was her reasoning for telling me that. She said she hoped she had raised her son better than that but you never know. She didn't want me going through what her friend had.
I always thought she was really just protecting my XH and his rights to my son. I still think that's the real reason but maybe she could see back then how irresponsible he was.
If you look back at your marriage, how he was as a husband and a father, I bet you can see that's how he's always been you just ignored it or didn't realize.