> I think it's really neat how the theorem is actually just a result of the domain being connected and the codomain having an order.
Everyone knows about the three major theorems of calculus:
But only the last one concerns any actual calculus! (It has to do with derivatives...) The statements of the first two are purely topological. As you note, the IVT is a result of a continuous function on a connected domain. Similarly, the EVT is a result of a continuous function on a compact domain.
Unlike connected domains, the standard definition of compactness is a bit harder to grasp at first glance: A subset Y of space X is called compact, if, given any collection C (finite or otherwise) consisting of open sets in X such that the union of sets in C contains of Y, one may extract a finite sub-collection C' of C such that the finite union of sets in C' still contains Y.
The Heine-Borel Theorem says that when X=R, the compact sets Y are exactly those that are closed and bounded, of which closed intervals in the statement of EVT are examples.
I personally don't think this definition makes a lot of sense on first glance. Why is this definition so weird? The reason is mostly history: Compactness is defined as such so that the various useful theorems depending on it make sense. Historically there were many other competing definitions of compactness that failed to generalize. You can find more discussion on this topic in the Topology textbook you chose (I recognized that it's Munkres...). There are a huge load of other forms of compactness, some of them are older, historically important, such as limit point compactness -- being the original definition proposed by Fréchet (it is enough for EVT! it is equivalent to compactness in R), while others are useful for different purposes, such as paracompactness for general partitions of unity, which can be used to prove integration by substitution for more than 1 variables.