Breakdown of Det var derfor han endret planen som de opprinnelig hadde.
Questions & Answers about Det var derfor han endret planen som de opprinnelig hadde.
In English, you say "That was why ...", which makes it tempting to reach for hvorfor. However, Norwegian uses the cleft construction Det er/var derfor ... (literally "It is/was therefore ...") to express "That is/was why ...".
Even though there is no word like at or som after derfor, the part that follows (han endret planen ...) is a subordinate clause. That means it uses straight Subject–Verb word order (han endret), unlike a normal main clause starting with Derfor, which inverts the verb and subject (Derfor endret han planen). If you added ikke, it would also go before the verb: Det var derfor han ikke endret planen.
The clause som de opprinnelig hadde is a relative clause (a type of subordinate clause) introduced by som. In Norwegian subordinate clauses, adverbials like ikke, alltid, egentlig, and opprinnelig are normally placed before the verb (opprinnelig hadde).
Putting opprinnelig at the very end (som de hadde opprinnelig) is also possible if you want to put extra emphasis or contrast on "originally", but placing it before hadde is the neutral, natural flow here.