She might want to prove herself in a male - dominated ninja world. If she shows herself as female, she could face discrimination or be underestimated. So, hiding her gender gives her a chance to be seen as an equal to male ninjas.
Well, she could start by dressing in a more androgynous way. Maybe wearing loose-fitting clothes that don't give away her feminine shape. Also, she might try to lower her voice or use certain speech patterns that are more associated with males in that fictional world.
Maybe she wants to avoid causing unnecessary worry among her friends and comrades. They are often involved in dangerous missions, and if they knew she was pregnant, they might get distracted. Naruto might think it's better to keep it a secret until she figures out how to handle the situation without disrupting their important work.
Perhaps in a world where female ninjas are persecuted, Naruto decides to hide her gender. She could team up with other characters like Sasuke, who slowly discovers her secret. Their relationship then becomes more complex as he has to keep her secret while also dealing with his own feelings towards her.
One reason could be for self - protection. In a dangerous or hostile environment within the fanfiction world, hiding gender can keep Sakura safe from potential threats.
Perhaps Naruto is waiting for the right moment to reveal his skills for maximum impact. He could be planning a big surprise for his enemies or wants to make a grand entrance at a crucial time. For example, in a major battle against a powerful foe, he could suddenly unleash all his hidden skills and turn the tide of the battle, which would be more effective than showing them off gradually.
Maybe in this fanfic, Harry discovers a prophecy that is related to her gender. To avoid fulfilling a part of it that could lead to disaster, she hides her gender. In the process, she could form new alliances with female students who are more in tune with her new 'female identity'. She might also face challenges in classes like Defense Against the Dark Arts because the teaching methods are sometimes more tailored to male students in the original Hogwarts setup.
Naruto could use clothing to her advantage. Wearing baggy and androgynous ninja outfits would help to conceal her feminine body shape. For example, the standard orange jumpsuit she often wears doesn't really give away her gender easily.
Perhaps some traditional pure - blood families who have strict ideas about gender roles in the wizarding world. They might not approve of Harry's actions of hiding her gender and try to force her to conform to the traditional male identity. They could use their influence in the Ministry of Magic or within Hogwarts to make things difficult for Harry.
He might want to protect himself. If others know how smart he is, he could become a target. Enemies might see him as a greater threat and go after him more aggressively.
Well, in such fanfiction, one idea could be that Naruto hides his gender to gain an advantage in a male - dominated ninja world. Maybe he feels that as a female, he'd be underestimated or treated differently. So by hiding it, he can prove himself on equal terms.