Hermione wasn't going to ruin a two-year-old's life by taking away his father.
She was twenty when she lost hers and she still hasn't gotten over it; imagine how being fatherless since birth will damage the boy – she just couldn't do it.
If Draco stayed out of his son's life, the boy would one day question why he hasn't got a father when every child around him had one; if Draco had a family with her, of which the child knows of, the boy would probably grow to be bitter.
She wasn't cruel.
So, she gave the boy her Draco.
