Your boss won't fire you for being gay if it turns out that they themselves are closeted or if they are laundering money, avoiding taxes or doing drugs, etc... Or even if your boss is in fact a very simple perfectly-behaved person, then 90% of employees in the company will have something potentially embarrassing about them and they're not going to fire 90% of the company.
The higher you go up the ranks of society, the more dirt you will find.
And the beauty of it is that people who are higher up the ranks will be uncovered first (due to public demand). The researchers didn't go after just anybody, they specifically looked up a politician and a judge. These are the natural targets; people who are supposed to represent and uphold society's moral ideals.
Because nobody has ever suffered for being outed as LGBT, minority religion or political party, etc.? Losing a job, being beaten or killed go way beyond embarrassment and those outcomes are a given for millions of people.
Many people like their various bigotries – whole religions feed on the social dynamics of saying everyone outside is sinful and trying to corrupt you – and while it'd be nice if revealing secrets lead to greater tolerance I'd bet a lot that the more likely outcome would be rage that they'd been infiltrated and purging anyone who had been keeping secrets.