It isn't new and it isn't going away. Employers have always exercised discretion in dismissing employees, and they especially exercise it for high-profile ambassador-like figures in the company. Public outcry (also not new), possibly amplified by media (again, not new), is just one justification they might use, and it's not the worst or most chilling among them.
There is no satisfying solution to stop this because of course we generally want businesses to be capable of responding to public pressure, though we might not always agree with the outrage or like the people it comes from.