Hello Stackexchange :) I am currently reviewing some notes from my linear algebra class and found out that my professor gave the rotation matrices for $\mathbb{R}^2$ with an 3x3 matrix and the one for $\mathbb{R}^3$ with an 4x4 one. Why is this neccessary? The last column and line of those seems superfluous.
Thank you in advance for your answers! :)

Here is what is going on. An isometry of $\mathbf R^n$ is a mapping $f: \mathbf R^n \to \mathbf R^n$ that preserves distances. If you want $f$ to fix the origin, then $f$ can be described by an $n \times n$ orthogonal matrix: $f(\mathbf v) = A\mathbf v$ where $A$ is an $n \times n$ matrix such that $AA^\top = I_n$ (that condition is what captures the "preserving distances" property).
But if you do not want to fix the origin, to truly get all isometries of $\mathbf R^n$, then you have to allow translations as well. The general isometries of $\mathbf R^n$ have the form $$ f(\mathbf v) = A\mathbf v + \mathbf b $$ for an $n \times n$ orthogonal matrix and a vector $\mathbf b$ in $\mathbf R^n$. Note $f(\mathbf 0) = \mathbf b$, so $\mathbf b$ is nothing other than where the origin is sent. A general isometry of $\mathbf R^n$ can be described as a rotation around the origin followed by a translation in some direction.
Let's call that isometry above $f_{A,\mathbf b}$. How do two isometries $f_{A,\mathbf b}$ and $f_{A',\mathbf b'}$ compose? For $\mathbf v$ in $\mathbf R^n$, $$ (f_{A,\mathbf b} \circ f_{A',\mathbf b'})(\mathbf v) = f_{A,\mathbf b}(A\mathbf v' + \mathbf b) = A(A'\mathbf v + \mathbf b) + \mathbf b' = (AA')\mathbf v + A\mathbf b + \mathbf b'. $$
So we have the composition rule $$ f_{A,\mathbf b} \circ f_{A',\mathbf b'} = f_{AA', A\mathbf b + \mathbf b'}. $$ It turns out that this composition rule can be described by going up $1$ dimension by thinking of $f_{\mathbf A,\mathbf b}$ as the block matrix $$ \begin{pmatrix}A&\mathbf b\\0&1\end{pmatrix} $$ acting on vectors $\binom{\mathbf v}{1}$ where $\mathbf v \in \mathbf R^n$. That is, the effect of that $(n+1) \times (n+1)$ matrix on the vector $\binom{\mathbf v}{1}$ is $$ \begin{pmatrix}A&\mathbf b\\0&1\end{pmatrix} \begin{pmatrix}\mathbf v\\1\end{pmatrix} = \begin{pmatrix}A\mathbf v + \mathbf b\\ 1\end{pmatrix} $$
It is not important for $A$ to be orthogonal for this "increase dimension by $1$" algebra to work out. For example, take $n = 1$: the function $f(x) = ax + b$ on $\mathbf R$ could be described as an effect of certain $2 \times 2$ matrices on vectors with bottom component $1$: $$ \begin{pmatrix} a& b\\0&1\end{pmatrix} \begin{pmatrix}x\\1\end{pmatrix} = \begin{pmatrix}ax+b\\1\end{pmatrix} $$
This explains why in the notes you displayed, the vectors on both sides have bottom component $1$ and the orthogonal matrix is in the upper $3 \times 3$ block of the $4 \times 4$ matrix. The convenience of such notation is it allows the not-entirely-matrix-looking operation $f(\mathbf v) = A\mathbf v + \mathbf b$ with nonzero $\mathbf b$ to be described entirely by a matrix operation up one dimension higher using $(\begin{smallmatrix}A&\mathbf b\\0&1\end{smallmatrix})$. If the translation part $\mathbf b$ is $\mathbf 0$, meaning the isometry is a rotation around the origin, then the $(n+1) \times (n+1)$ matrix will have zeros along the right column except in the bottom right entry, which will be $1$. And if you only want to discuss rotations around the origin, then it is kind of silly (or superfluous, as you wrote) to use the $(n+1) \times (n+1)$ matrices.
A compelling reason to use the larger matrices is the potential to allow translations as part of the transformations under consideration.
Another compelling reason is if you want to allow rotations around a general point of $\mathbf R^n$, not just the origin. For example, suppose an $n \times n$ orthogonal matrix $A$ describes a rotation around $\mathbf 0$ that you are interested in, but you'd like to apply it to rotate around some other point $\mathbf r$ instead. The way to do this is
Translate a vector backwards by $\mathbf r$ ("recenter from $\mathbf r$ to origin")
Apply $A$ (desired kind of rotation around origin)
Translate forwards by $\mathbf r$ ("recenter from origin to $\mathbf r$).
That means $$ f(\mathbf v) = A(\mathbf v - \mathbf r) + \mathbf r = A\mathbf v + (\mathbf r - A\mathbf r). $$ Notice $f(\mathbf r) = \mathbf r$, so this is fixing $\mathbf r$ just as you want (a rotation around $\mathbf r$ should not move $\mathbf r$). This has the form $f(\mathbf v) = A\mathbf v + \mathbf b$ where $\mathbf b = (I_n - A)\mathbf r$. The upshot is that rotation around a point other than the origin is the same thing as rotation around the origin followed by a certain translation that involves the rotation matrix $A$ and the point $\mathbf r$ you want to be centering everything around. So even if you are interested only in rotations, including rotations around general points of $\mathbf R^n$, you should be allowing translations too and that's where the nonzero $\mathbf b$'s come from merely from interest in rotations (around general points, not just the origin).