Cross post from MSE. and sorry if this is an obvious question.
Here is a line of proof of Theorem 1.15 from Ricci Flow and the Sphere Theorem by Simon Brendle
Let us fix two points $p, q \in M$ such that $d(p, q) = \operatorname{diam}(M, g) > 2$. Since $\pi_k(M)\neq 0$, there exists a geodesic $\gamma : [0,1] \to M$ such that $\gamma(0) = \gamma(1) = p$ and $\operatorname{ind}(\gamma) < k$.
Q: Why $\pi_k(M)\neq 0 \implies \operatorname{ind}(\gamma) < k$? Is this a general fact?
Note: $\operatorname{ind}(\gamma):=$ Morse index of $\gamma$.