It’s not just her child. If she’s going to keep it, that man has every right to be a parent to it (unless he committed some crazy offense against the mother).
It’s basically kidnapping if she doesn’t tell him. It was his kid too, and she took the child away from him without his consent or the child’s consent. She’s also harming the child by taking away their father. It’s a shitty thing to do all around.