There is a difficult, but direct way of proving this, and an easier, but slightly more opaque way. I will go for the more opaque.
A linear map is uniquely determined by where it sends your chosen basis vectors. In this case, your basis vectors are $(1,0)^T$ and $(0,1)^T$ (the standard ones). Given a linear map, its matrix representation is given the following way: the first column is where the transformation sends the first basis vector, the second column is where the second basis vector is sent, and so on.
In this case, the first basis vector, when rotated by $\theta$ counterclockwise, becomes $(\cos\theta, \sin\theta)^T$, so that's the first column. The second basis vector becomes $(-\sin\theta,\cos\theta)^T$, which is therefore the second column of the matrix.
The more direct route is taking a general vector $(a,b)^T$, figuring out where it ends up using trigonometry, and then reading the matrix from there. It's definitely doable, but in my opinion more work.
The link between the two methods is that $(a,b)^T=a(1,0)^T+b(0,1)^T$, and rotation is a linear transformation. So where $(a,b)^T$ ends up, and therefore the coefficients you read off are directly related to where the unit vectors end up. The $a$ in $(a,b)^T$ on the left-hand side only interacts with the first column of the transformation matrix, and that's the same as $(1,0)^T$ on the right-hand side. Same for the $b$ and the second column.