Using a rotation matrix to transform/shift a pinhole camera
It looks like you got it, but what's actually going on here is that you are working in homogeneous coordinates.
In this system, a point in space is represented as a 4-tuple, $(x,y,z,1)$. You can multiply this 4-tuple by any non-zero constant and it represents the same point, so this is equivalent to $(wx,wy,wz,w)$ for any $w \ne 0$.
A vector is the difference between two points, and this is represented as a 4-tuple with a zero in the fourth component, $(x,y,z,0)$.
Right-multiplying that 4x4 matrix by a point has the effect of adding the translation component, and right-multiplying by a vector has the effect of not adding the translation component.