I'm currently taking my first course in real analysis, and was recently introduced to the following definition of compact sets:
A set $S \subseteq \mathbb{R}$ is compact if and only if every open cover of $S$ contains a finite subcover.
Shortly after learning the above definition of compact sets, I learned the Heine-Borel Theorem, which states that a subset $S$ of $\mathbb{R}$ is compact if and only if $S$ is closed and bounded. Therefore, the Heine-Borel theorem presents us with an equivalent way to think of compactness. To me, it seems much simpler to define compactness in terms of closed and bounded sets instead of open covers and finite subcovers. My question is, why are compact sets defined using open covers and finite subcovers? Why were compact sets not originally defined to be subsets of $\mathbb{R}$ that are closed and bounded? So far in my study of analysis, introducing open covers and finite subcovers seems to be needlessly complicating things.
I've searched around the internet for answers, but most sources that I've come across discuss subjects from topology which are beyond what I've studied in analysis. Any answers that can be presented in the context of a third-year introductory course to real analysis will be much appreciated. Thank you!