Why is this theorem also a proof that matrix multiplication is associative? The author remarks that this theorem, which is basically all about what happens if we compose linear transformations, also gives a proof that matrix multiplication is associative:

Let $V$, $W$, and $Z$ be finite-dimensional vector spaces over the field $F$; let $T$ be a linear transformation from $V$ into $W$ and $U$ a linear transformation from $W$ into $Z$. If $\mathfrak{B}$, $\mathfrak{B^{'}}$, and $\mathfrak{B^{''}}$ are ordered basis for the spaces $V$, $W$, $Z$, respectively, if $A$ is the matrix of $T$ relative to the pair $\mathfrak{B}$, $\mathfrak{B^{'}}$, and $B$ is the matrix of $U$ relative to the pair $\mathfrak{B^{'}}$, $\mathfrak{B^{''}}$, then the matrix of the composition $UT$ relative to the pair $\mathfrak{B}$, $\mathfrak{B^{''}}$ is the product matrix $C=BA$.

However, I see no reason why that's true...
 A: Associativity is a property of function composition, and in fact essentially everything that's associative is just somehow representing function composition.  This theorem says that matrix multiplication is just composition of linear transformations, and so it follows that it's associative.
Of course in reality this is backwards: the "true" definition of matrix multiplication is "compose the linear transformations and write down the matrix," from which you can easily derive the familiar algorithm.
A: Let $A$ be a $p \times q$ matrix, $B$ a $q \times r$ matrix and $C$ a $r \times s$ matrix. Let
$$
 f \colon K^q \to K^p, \quad x \mapsto A x, \\
 g \colon K^r \to K^q, \quad x \mapsto B x, \\
 h \colon K^s \to K^r, \quad x \mapsto C x.
$$
Then with respect to the respective standard bases of $K^n$ for $n \in \{p,q,r,s\}$ the linear map $f$ is represented by $A$, $g$ by $B$ and $h$ by $C$. 
Using the theorem we find that $f \circ g$ is represented by $AB$, and so again by the theorem we find that $(f \circ g) \circ h$ is represented by $(AB)C$. In the same way we can see that $g \circ h$ is represented by $BC$ and therefore $f \circ (g \circ h)$ is represented by $A(BC)$.
Because composition of functions is associative we have $f \circ (g \circ h) = (f \circ g) \circ h$. Therefore the corresponding matrices must also be the same, which means that $A(BC) = (AB)C$.
