In Munkres, he proves that every closed subspace Y of a compact space X is compact. In the proof, he adjoins the open set X - Y to an open cover of Y, and then he goes on to prove Y is compact.
Why did he adjoin X - Y to this open cover? Could he have adjoined any open set that already includes X - Y, such as X? What is wrong with adjoining X? Are there counterexamples that demonstrate why X isn't a good choice?
As you say in the comments, the extended open cover could have a finite subcover other than $\{X\},$ but we have no way to know that without using the very result that we're trying to prove!
The goal, instead, is to turn the open cover $\mathcal U$ of $Y$ into an open cover $\mathcal U'=\mathcal U\cup\{U\}$ of $X$ by adjoining some open subset $U$ of $X,$ then to use compactness to reduce obtain a finite subcover of $\mathcal U',$ say $\mathcal S,$ such that $\mathcal S\cap\mathcal U$ is a cover of $Y.$
If we let $U$ cover $Y$ even in part, then we might lose that possibility, due to throwing out sets that weren't necessary to cover $X,$ but which we needed to keep to cover $Y$! For example, consider the real intervals $X=[-2,2]$ and $Y=[-1,1].$ Cover $Y$ with $\mathcal U=\bigl\{(-2,1),(0,2)\bigr\}.$ Then $\mathcal U\cup\bigl\{[-2,-1)\cup(0,2]\bigr\}$ is an open cover of $X,$ and has the subcover $\bigl\{(-2,1),[-2,-1)\cup(0,2]\bigr\},$ but $\bigl\{(-2,1)\bigr\}$ doesn't cover $Y.$
Thus, we must take $U\subseteq X-Y.$ On the other hand, in order for $U'$ to be guaranteed to be a cover of $X,$ we also need $U\supseteq X-Y.$ After all, we could have $Y=\bigcup\mathcal U.$ Thus, the proof used $X-Y$ to extend the cover.