Seems like that can apply to a lot of situations, not just the Catholic church. If something isn’t public, how would anyone know there was a scandal?
It’s the fearing of scandal (public shame and disgrace) more than the fearing of scandal (stumbling block and temptation) that leads to cover-ups, not just in the Catholic Church.
Maybe it is better to air your dirty laundry in public, and then wash it clean - better than stuffing it all in the basement and closing the door.