There is another example of a non-primitive-recursive but total computable function that explains better what the restricted definition of primitive recursion entails.
Each primitive recursive function is defined by a particular finite set of recursion equations, in terms of a fixed set of basic functions. We can use this to define an effective scheme for indexing all the primitive recursive functions. Let $(f_e : e \in \mathbb{N})$ be an effective indexing of the unary primitive recursive functions, meaning that
Let $g(e,n)$ be the function that computes $f_e(n)$. We call $g$ a universal binary function. It is universal in the sense that it encapsulates all unary primitive recursive functions.
The function $g(e,n) = f_e(n)$ is certainly a total computable function. It is not primitive recursive. One reason is that for some $e_0$, $h(n) = g(e_0,n)$ is the Ackermann function, which is not primitive recursive. But there is another reason that I want to explain.
Suppose that $g(e,n)$ is primitive recursive. Then the function $f(n) = g(n,n)+1$ is also primitive recursive, as you can verify. But this function $f(n)$ cannot be of the form $g(e,n)$ for any fixed $e$, because for every $e$ we have $f(e) = g(e,e) + 1 \not = g(e,e)$, by the definition of $f$. Thus $g$ is total computable but not primitive recursive.
This diagonalization proof can be used in any system that is closed under a few basic operations. The moral of this construction is a key fact in computability theory:
A system of (partial) functions in which every function is total, and which has certain basic closure properties, cannot include a universal binary function. (The basic closure properties are the ones used in the proof above.)
The point is that there is a fundamental incompatibility between the goal of making a system concrete enough that every function is total, and making a system strong enough that it includes universal functions for itself. Only one of these goals can be achieved at a time.
There is a universal binary partial function for the set of unary total computable functions. In fact there is a universal binary partial function for the set of unary partial computable functions, a larger class. This fact is essentially equivalent to the existence of a universal Turing machine.