Factorio quickly demonstrates to the player the danger and cost of bolt-on / ad-hoc / spaghetti code solutions, and likewise the benefits of a bit of forethought.
Doing some pre-planning of your factory's eventual layout will have you advancing through the tech tree much, much faster (and without rebuilding critical sections all the time!)
I wouldn't attributed this to programming but pre-planning in general benefits a lot of places. That goes to the comment in the article that "a bad plan is better than no plan".
I totally know what you mean a spaghetti factory is just as hard to deal with as spaghetti code...
until you have bots and you can actually copy paste your factory around to cut and paste your factory it's super hard to fix the problem.