It may not seem it, given the MCU continues to downplay their value, but secret identities are still really important. They're prevalent across Marvel and DC, and serve a purpose in protecting heroes and their loved ones from being targeted as civilians. Having that safety net exposed, then, tends to be a pretty big deal, and it's no surprise that it's a trope multiple comics have deployed in different years to different figures.
But whereas most identity reveals come from characters choosing to share their identity, sometimes - as Spider-Man: Far From Home demonstrated - that opportunity is robbed from them.
Sometimes they get exposed, either due to an ally or enemy connecting the dots and figuring out who they really are, or because they were careless in the line of duty, and it usually leads to some explosive scenarios.
Secret identities might be considered a tired staple in some circles, but they serve a valuable purpose. That's what makes it so terrifying when villains or other characters are able to lift the lid and peer underneath, as it opens up a hero to a whole new realm of possibilities - none of them good...