What is the intuition behind the following theorem of Reeb?

> If a compact manifold admits a function with only two critical points, it is homeomorphic to the sphere.