Because a subset of a compact set is smaller than the compact set, the subset might have a different open cover that does not cover the compact set.
This open cover may not have a finite subcover.
Example: Let $A = [0,1]$ and $B = (0, 1] \subset A$.
Now $U = \{U_i| U_i= (\frac 1i, 1.1)\}$ is an open cover of $B$ but it is not an open cover of $A$. (And $U$ does not have a finite subcovering of $A$.)
To extend $U$ so that that it will cover $A$ we must add an open set that contains $0$. Call that $U_{\alpha}$ and $0 \in U_{\alpha}$ and now $U \cup \{U_{\alpha}\}$ is an open cover of $A$.
But $U_{\alpha}$ is open so there is an $r > 0$ so that $N_r(0) = (-r, r) \subset U_\alpha$. But we can find an $n > \frac 1r$ or in other words $0 < \frac 1n < r$.
So $(0, \frac 1n] \subset U_{\alpha}$ so $(0, \frac 1n]$ is covered but the single open set $U_{\alpha}$. Without $U_{\alpha}$ and with only $U = \{U_i = (\frac 1i, 1.1)\}$ we would have needed an infinite number of $U_i| i > n$ to cover $(0, \frac 1n]$. But with $U_{\alpha}$ we don't need ANY of them anymore.
So ... throw them away! We are left with $\{U_\alpha\} \cup \{U_i|i \le n; n > \frac 1r\}$ and that is a finite subcover of $A$. And of $B$.
But the point is. Without the requirement that there is an open set containing $0$ we wouldn't have a situation where a single open set must "do the work" of an infinite number of open sets which a non-compact set without the point $0$ could require.
... more explicitly with maybe too much detail...
So $A \setminus U_\alpha \subset (\frac 1n, 1]\subset B$. And $(\frac 1n, 1]$ is covered by the finite subclass $\{U_i| i \le n\}$ and we don't need $\{U_i| i > n\}$ any more because $U_\alpha$ covers everything in $A$ that was not covered in $\{U_i|i > n\}$.
(Namely $U_{\alpha}$ covers $\{0\} \cup (0, \frac 1n]$ whereas without $U_\alpha$ we needed ALL of $\{U_i| i > n\}$ to cover $(0, \frac 1n]$)
So $\{U_i|i \le n\} \cup \{U_\alpha\} \subset U \cup \{U_\alpha\}$ is a finite subcover of $A$. (even that $U$ had no finite subcover of $B$.