The first, important, way is that a tool that offers solid theoretical foundations does not (necessarily) require those foundations. You mention algebra, for example, and it's fair to assume that most school students (and probably their teachers!) don't really appreciate the theoretical grounding of algebra—but they can still hopefully use it with proficiency. In the same way, pure functions and referential transparency need only be difficult to apprehend if you insist on investigating their theoretical foundations; they can just be the way things work, and, if this is a first programming language, then there are no habits regarding mutable state to unlearn before being able to handle immutability.
The second is that, as nine_k (https://news.ycombinator.com/item?id=9982600) points out, learning these concepts before algebra could make understanding algebra itself easier. There are deeply mathematical ideas in the foundations of most programming, even if they are (and even when they should be) hidden, and learning these ideas can help one to come to grips with abstraction in a context that encourages play and experimentation, unlike (unfortunately) the usual mathematics classroom.