Many interesting systems (like springs) are near equilibrium, which means that the potential energy is at a local minimum. A spring is an example, but also a pendulum.
When the potential is at a local minimum, its gradient is zero. So if you Taylor expand it you only get second-order contributions. For a spring, the potential energy looks like V(x) = V(0) + k * x * 2 where x is the displacement and k is a constant.
Differentiating, you get harmonic motion: F(x) = k * x
Broadly speaking, this applies to all systems near equilibrium, simply from Taylor expanding the energy. And it's not only in classical mechanics, but in all branches of physics. Sydney Coleman [0] is often quoted as saying something like "QFT is simple harmonic motion taken to increasing levels of abstraction." [1]
[0] https://en.wikipedia.org/wiki/Sidney_Coleman
[1] https://physics.stackexchange.com/questions/355487/qft-is-si...