The Derangement is the term used by the tribes to refer to a historically important change in the machines' default behavior toward humans, from docility and avoidance to progressively more hostile. It also refers to the appearance of more dangerous machines that were built specifically for combat against humans. The Nora Brave Aloy first heard the term and its meaning from the Oseram Vanguard Erend when she met him at Mother's Heart the night before she ran in the Proving.
Prior to the Derangement, all of the machines encountered by humans were designed and controlled by GAIA, a highly advanced artificial intelligence who built the machines to aid in her task of terraforming the Earth and re-seeding it with life after the apocalyptic extinction of all life on the planet caused by the Faro Plague. One of GAIA's Subordinate Functions, HEPHAESTUS, was responsible for building the machines in automated underground facilities called Cauldrons. Since humans were among the forms of life reestablished by GAIA, the machines were passive and shy towards humans, much like organic wildlife.
However, roughly a year prior to the infant Aloy being given to Rost to be raised, a signal of unknown origin caused GAIA's subordinate functions to become artificial intelligences themselves. In order to prevent HADES, the former terraforming reset subordinate function, from taking over and destroying all life again, GAIA self-destructed. Meanwhile, humans had taken to hunting machines for useful resources. HEPHAESTUS resolved to stop this by any means necessary. It infiltrated and took control of five known cauldrons and altered the machines' default behavior to protect them by making them progressively more and more hostile to humans, culminating in them attacking humans on sight. To afford them even more protection, HEPHAESTUS began altering the design of some of these terraforming machines for combat against humans. It also designed and had the cauldrons built machines specifically for patrol against humans, such as Watchers, and other machines specifically designed for combat-ready defense, such as Sawtooths, Ravagers, and Thunderjaws.
Humans, not knowing of GAIA or the machines' purposes, had various theories and reactions to their newfound hostility, though all tribes began making increased efforts to hunt them down and cull their numbers before they could threaten settlements. The Carja in particular saw the Derangement as punishment meted out by the Sun, which they worshiped as a deity. Believing that the Sun was displeased with them and needed to be appeased for the Derangement to end, the thirteenth Sun-King Jiran instituted a program of raiding other tribes to take prisoners for human sacrifice to the Sun. This was ended when his son Avad, disgusted with this brutality, killed him and became the fourteenth Sun-King.
Because of the Derangement, the machines remain hostile toward humans, and constituted the vast majority of enemies encountered by Aloy on her journeys. The Derangement is also indirectly responsible for many of the conflicts between the various tribes, such as the continued distrust of the Carja by other tribes, as well as the creation of intra-tribal factions such as the Shadow Carja.