This attitude is completely wrong and Haram in light of Islam. Islam teaches us to hide faults of others instead of spreading them. there are so many Hadiths whom's words are similar to like this:
Whoever conceals the faults of others, Allah will conceal his faults in this life and the Hereafter.
another hadith says
A believer is not a fault-finder and is not abusive, obscene, or course.
when we come to know about the faults of others then we should try to talk about it with that person to help him changing it instead of telling the world. by telling faults of others you will not only earn sin but will also lose respect and Allah SWT will also not hide your faults as mentioned in the Hadith.
however there are some conditions in which you cannot hide the fault of a person and you will have to share it with others. for example if a person is doing something that is harming another person and he is doing it repeatedly then you should tell about it to the person who is getting harmed.
If fault of a person is related to rights of Allah then you should hide it. for example if a person not offers Prayer regularly. you should not tell this to everyone. instead you should talk about it with that person.
so these are some points that we should keep in mind about the faults of other people. May Allah SWT guide us to right path Ameen.