It's because of dilution of responsibility, each individual didn't do anything wrong, but take all together it adds up to wrongdoing.
It's not usually nefarious, it's usually a result of imperfect information - each individual works off of the information they have which leads them to wrong actions as a whole, but correct actions individually.