Exactly. Sometimes a thing is done, not because it's genuinely necessary or preferable, but just because it's taken for granted. The stories that stand out are the ones that do question the cliches and conventions.
The earliest "secret identity" stories tended to give their characters good reason for their secrets. The trope is generally considered to trace back to the novel The Scarlet Pimpernel, whose title character was rescuing nobles from execution during the Reign of Terror in the French Revolution. So he had good reason to conceal his identity to protect himself from capture by his ruthless enemies. Similarly, Zorro/Don Diego lived under a corrupt regime and would probably face execution if he were exposed as a rebel against the state. In later stories, it got muddier. I guess the Shadow had a secret identity because his methods were all about misdirection and concealment; in fact, in the pulps, he had multiple secret identities. But by the time superhero comics came along, secret identities had just become the default expectation, and they were better justified in some cases than others.
The use of secret identities in Japanese tokusatsu superhero shows has often been quite arbitrary. I mentioned Ultraman and the Power Rangers, but early Kamen Rider was often even worse about it. The Rider would work with a monster-fighting team in his civilian identity, then change into Rider form and fight the same monsters with the same allies, yet he told no more than one of his allies that he and the Rider were the same person. There was no reason not to tell them when they were on the same team, and when the hero fulfilled the exact same role in the organization as both civilian and Rider. It was just an arbitrary requirement that he have a secret identity because that's what superheroes do.