Most of the issues, usually, originates from the top. If top leaders don’t get along or feel the need to protect themselves and think about politics more than work itself, then everyone down the ladder will reflect that upon the organization.
Then, work struggles between departments and alliances start to form. Mix that with a strict KPI system and voila, a toxic environment emerges.