A friend is writing a book for non-mathematicians; he has asked me some questions... One possible direction I suggested was whether a topological space (metric space can probably be assumed given what he said) for which every real-valued function achieves its maximum must be compact; and, if not, does this property have a name?
He thought this probably did not work, but neither one of us has an example. There is a bookstore nearby which has copies of Counterexamples in Topology as well as Counterexamples in Analysis, and I can go browse them when I'm over jet lag. Meanwhile, for any students confused by these topics (topology and analysis) or not seeing the motivation, counterexamples are the best way to understand the limitations of a theorem and why it was worth proving in the first place.