Consider two orthogonal, right-handed frames whose orientations and positions are as depicted in the below picture.

In order to bring the axes of frame {A} onto those of frame {B}, we can first rotate {A} about axis $Z_A$ $\alpha$ degrees counterclockwise and then translate an amount of s in the $X_A$ direction. We could do the opposite. The two operations do not yield the same result, what is more, first translating then rotating produces a false result.
Rotate and translate:
$$ \begin{bmatrix} 1 & 0 & s \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} \cos\alpha & -\sin\alpha & 0 \\ \sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}=\begin{bmatrix} \cos\alpha & -\sin\alpha & s \\ \sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} $$ which is true; translate, then rotate: $$ \begin{bmatrix} \cos\alpha & -\sin\alpha & 0 \\ \sin\alpha & \cos\alpha & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} 1 & 0 & s \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} =\begin{bmatrix} \cos\alpha & -\sin\alpha & s\cdot\cos\alpha \\ \sin\alpha & \cos\alpha & s\cdot\sin\alpha \\ 0 & 0 & 1 \\ \end{bmatrix} $$ which is false.
I know that the order of operations should be maintained when there are at least two rotations, but here there are just one translation and one rotation. My questions are,
Why don't one translation and one rotation commute?
Why did I get a false matrix when I first translated?
Matrix $$\begin{bmatrix}\cos\alpha & -\sin\alpha & 0 \\\sin\alpha & \cos\alpha & 0 \\0 & 0 & 1 \end{bmatrix}$$ is matrix of rotation around coordinate origin. In second case you want to rotate vectors around point $Z_B$, and matrix of that rotation is more complicated.
In general, when you want to rotate vectors about some point $A$, then you should translate $A$ to origin, do rotation of vector, and then translate rotated vector back to $A$.