where the story came from
Terraria shipped without a story. Eight years after release, Re-Logic wrote one and published it as images of inked parchment on the official forum. The framing was deliberately loose: this is one reading of the world rather than a canon that overrides anything, and the developers have said the only lore that counts as official is what is actually in the game. Plenty of Bestiary entries do line up with the text, which is as close to confirmation as it gets.
worlds that think
The premise is that gods set up a balance and treat maintaining it as worth any cost. Every Terraria world is a living, aware thing that can feel what its inhabitants think, and its job is to hold that balance in place by whatever means are available. This reframes the spreading biomes completely. The Corruption, the Crimson and the Hallow are not rival factions or invaders. They are the world's own defense mechanisms, and they are as hostile to you as to everything else.
the crimson and the corruption
The Crimson is described as a single organism, hive minded and wired directly into the world it grows on, which has already absorbed thousands of worlds before this one. People have worshipped it as a god and fed it bodies to buy its favor. It takes them, becomes them, and produces the creatures you fight down there, which no longer feel anything and only follow the hive.
The Corruption works from a different direction. It is a cancer fed by the harm the living do, growing on their actions and their thoughts, and it spreads because consuming is the only thing it knows. Its endpoint is not balance restored but everything gone, the world emptied out. The two evils being mutually exclusive in a single world reads better this way. They are two answers to the same question.
why the hallow appears when it does
The Hallow is the response to a death. Each world has a Guardian at its core, and when that Guardian is destroyed the world lets loose its Ancient Spirits of Light and Dark so a replacement can be found faster. The Hallow grows out of that: purity pushed past any sane limit, treating anything in its path as an infection to be cleared, whether or not it was a threat. That is the in-fiction reason a new evil biome and the Hallow appear in the same moment the world changes over.
cthulhu, in pieces
The named threat is Cthulhu, which arrived long ago with no motive beyond ruling and ruining everything alive on the planet. Nothing could stand against it until the Dryads, who are tied to the world itself, went to war. They could not kill it. What they managed was to tear out its eyes, chunks of its brain and part of the skeleton, crippling it badly enough that it retreated to the far side of the moon, where it has been gathering strength ever since. Almost every Dryad died doing it, and the last survivor has not been seen in generations.
That is where the boss list stops looking arbitrary. The Eye of Cthulhu and the Brain of Cthulhu are the parts that came off, and the Moon Lord is what is left of the thing itself, finally coming down from where it was hiding.
the cult, the mechanic and the dungeon
The present day plot is a restoration project. A cult led by a fanatic has spent the intervening centuries trying to put Cthulhu back together. To do it they kidnapped a woman known for her engineering, the Mechanic, and forced her to build mechanical replacements for the missing organs. She is nearly finished when your story starts, with only the mechanical brain left to complete.
Travelers passing the Dungeon report construction noise and screaming from inside, which is where she is being held. The Dungeon was a city once, alive and busy, until a curse drove everyone in it mad and kept them going long after their bodies had rotted away. The Old Man outside is one of the possessed rather than a bystander, and the Lunatic Cultist you eventually fight runs the whole operation.
Two things about this pay off in play. It explains why the Mechanic is found in the Dungeon rather than anywhere else, and it explains why the mechanical bosses are copies of earlier organic ones instead of new creatures. The Guide sits on the other side of the conflict, part of an order that has been passing this knowledge forward for generations, which is why he is standing there on your first day.
how much of it to believe
Parts of the released story contradict things the developers said before it existed. Redigit had previously described the cultists as trying to prevent Cthulhu returning, the opposite of what the text says, and he has also said his own remarks about lore should not be taken as authoritative. Treat the whole thing as a frame that makes the progression read like a story, not a rulebook you can check answers against.

