I have come across the following proof of the stated theorem:
I fail to understand somehow why this depends on $K$ being closed? Can we just argue that $K \subseteq X \subseteq \cup_n U_n$ ($\{U_n\}$ finite open cover of $X$) since $X$ compact? This would easily generalise to any subset of $X$ which seems wrong.

It depends on $K$ being closed because then $X\setminus K$ is open. Thus, when it is included in the cover, it is truly an open cover, of which you may take a finite subcover.
Note the method is this: they take an arbitrary open cover of $K$. By adding a single open set (that is, $X\setminus K$), we extend it to all of $X$. Since $X$ is compact, there is a finite subcover of the cover that we just listed. You can use this to deduce that $K$ is covered by finitely many elements in the subcover (which came from an arbitrary open cover). In particular, $K$ must be compact.