Internal documents and engineers said the planning department fostered a culture of favoritism, discrimination and disorder.