Definitely a lot of ways this can and does happen.
The boyfriend may have to live and work in another town, or even another country.
She may have got pregant unexpectedly, while they were still living apart. Her home may be too cramped to fit anough adult as well as a new baby, and they may have trouble finding somewhere bigger they can afford.
He may actually be an ex-boyfriend who's still on good terms with her- one of my friends was kicked out by his girlfriend when their baby was 2, but patched things up enough to have regular access to the child.
So, it's a plausible situation, and could be interesting to write about.
_________________
"Your silence speaks volumes to your interest, so I'll keep talking about this a lot."