Why is a substitution like $$(a+b)(c+d) = k(c+d)\;where\ k = a + b$$ valid? I can tell that it just is, but I wouldn't be able to explain it to a child.
My "best" explanation of when it's valid is that expressions are defined in terms of values and operators, and recursively nested expressions, so any substitution like this can be made of an expression.
But where/how in theory of algebra, numbers, or symbolic manipulation is it defined that substitutions like this are valid in the first place?
This is actually an application of the formal definition of equality. There are several such definitions: in logic, in set theory, and so on. When you say "$k = a+b$", you say "in any well-formed formula where $k$ appears, we may replace that occurrence with $(a+b)$, and vice versa." (The use of parentheses is to avoid any issues of operator precedence.) The details of this semantic statement vary from setting to setting. Interestingly, most formal definitions implicitly define some version of "a witness to inequality" -- some predicate or some element of a set that exposes a failure of equality with another predicate or with another set. Regardless of your particular setting, you are free to bind new variables to any expression you like, so if $k$ is not already bound, you are free to bind it to $a+b$.
Less formally, $k$ is serving as a pronoun, just like "you", "me", "he", "she", "this", "that", et c. Using "$k$" is just a shorter way to reference $a+b$ and our formalisms should capture that the use of one or the other is a distinction without a difference.