To maintain their freedom. If superheroes were publicly known, they would likely be subject to a great deal of scrutiny and control by the government and the media. This could limit their ability to operate effectively and independently. By keeping their identity secret, superheroes can maintain their freedom and flexibility to fight crime on their own terms.
To create an element of surprise. When superheroes are able to surprise their enemies, they are more likely to be successful in defeating them. This is because their enemies are not expecting them and are therefore less prepared to defend themselves. By keeping their identity secret, superheroes can create an element of surprise and increase their chances of success.
To protect their own privacy. Superheroes are often people with extraordinary abilities and unique backgrounds. They may not want to share this information with the public, and they may want to keep their personal life private. By keeping their identity secret, superheroes can protect their own privacy and maintain a sense of normalcy in their lives.