The word literally means a person whose birth is illegitimate, the offspring of a mother not married, a person who has no claim upon a specific father for support and care. But bastard also means that the person is evil, mean, and unlovable. Bastard in the first sense suggests that the child is likely neglected and abused. Bastard in the second sense means that the person is intrinsically undesirable. These two meanings converge into the one word because the two meanings characteristically converge in fact.
Bastards tend to become bastards, and if they breed, they tend to beget bastards in turn.
And she, uttering the word as though it were the ultimate curse, psychologically fuses the bastard growing within her with the father. Her child, abused and neglected as he is likely to be, is truly a bastard in one sense and is likely to become a bastard in the other.