The Heine–Borel theorem says:
A subset of $\mathbb R^k$ is compact if it is closed and bounded.
At the same when I think that any either closed or bounded is enough: if it is bounded it must be a subset of a $k$-cell and thus compact. If it is closed, every subsequence converges to the limit that lies in it and hence compact.
So, why don't they say a set is compact if either it is closed or bounded?
There are closed sets that are not bounded, for example $\{ x : x \ge 0 \}$ as a subset of $\mathbb{R}$, and there are bounded subsets that are not closed, for example $\{ x : -1 < x < 1 \}$, again as a subset of $\mathbb{R}$.