On one hand, a 'theory' is described as something completely internal and irreducible: "the theory, is not, and cannot be, expressed" (quote from PATB)
But on the other hand, a 'theory' is applied to external objects: "if viewed in relation to the theory of the program these ways [of changing it] may look very different, some of them perhaps conforming to that theory or extending it in a natural way, while others may be wholly inconsistent with that theory" (quote from PATB)
These cannot both be true. A 'theory' cannot be wholly internal if it is applied to things. If something external conforms to it to some degree, then that thing is to that degree an expression of the 'theory'. What else is an expression? And, a 'theory' cannot be irreducible if it applies to things that are reducible. If it matches something -- like software -- that is complex and determinate, it must itself be analysable into determinate properties or patterns or structure.
Since 'theory' is used to make actual software -- something that can fit or diverge from it -- 'theory' must have a substantial, and complex, objective part.
So instead of this confused term 'theory' we should think of something like a material: programming is the engineering-design of structures in a particular abstract 'material'.
That does not change the article's conclusions about programmers not being 'replaceable components of production'. But it gives a better viewpoint of the activity: not merely some obscure inaccessible idea of human thought, but some lead on the part of it that is objective and that we can get hold of and hopefully build some understanding of.