It could be due to jealousy. Perhaps Ginny has been spending a lot of time with another character, and Harry misinterprets their relationship, leading to his anger. In fanfiction, the writers often play with such emotions to create drama.
One possible reason could be that he's worried about Ginny's safety during the pregnancy. He might be overprotective and his concern comes out as anger.
It might be that there was some sort of misunderstanding. For example, a rumor spread that Harry was getting too close to one of his female colleagues at work. Ginny, being a fiery character, got mad without really knowing the truth. In fanfic, these kinds of misunderstandings are often used to create drama.
She might be hurt at first. Since she's pregnant, her emotions could be more fragile, and Harry's anger could really sting.
In some fanfictions, Ginny might be mad at Harry because of a misunderstanding. For example, she could misinterpret his actions towards another girl as being unfaithful. Maybe he spends a lot of time with Hermione on a project and Ginny thinks there's something more between them.
She might hate it because it could change the way people see her character. In the original story, she is a strong and independent person, but fanfiction might portray her in a wrong way.
Often, it starts with the initial moment of Harry getting mad. Then Ginny tries to figure out why he's so angry. For example, she might approach him and ask directly, but Harry could be too stubborn to tell her right away.
In some fanfictions, Ginny might be written to betray Harry because of a prophecy. The prophecy could mislead her into thinking that Harry was going to bring doom, and so she decides to act against him to prevent that. It's a different way of looking at their relationship compared to the original story, where their bond was based on love and trust.
One possible reason could be a growing apart due to their different career paths. Harry, being deeply involved in the wizarding world's security and Ginny having her own Quidditch career. Another reason might be the stress of living in the public eye. Their relationship may not be able to withstand the constant scrutiny and pressure from the wizarding community.
Maybe in fanfiction, Ginny discovers that Harry still has some unresolved feelings for Hermione. This could create a rift between them and lead to a divorce. It's not uncommon in fan - created stories to explore complex love triangles that were not fully resolved in the original series.
One possible reason could be that Harry was away a lot after the war, dealing with the aftermath and his newfound responsibilities. Ginny might have felt neglected. Maybe she expected more time together, but Harry was constantly occupied with things like helping to rebuild Hogwarts or being involved in the Ministry's new initiatives.