Maybe gravitational push-pull between planets and moons... IDK, it might be some sweet spot they discovered where gravitational forces do weird things, lol 😂.
This. There's 5 Legrange Points for every 2 body system. They're specific points around the 2 bodys where the gravity "cancels out". In this case the 2 body system is the Earth and the Sun. JWST is sitting a million miles from Earth at L2.
Dammit, I was feeling proud that my first thought on how this could work lined up with the explanation... But I had assumed L2 (didn't stop to think about the label) was where I now see L1 to be. I can wrap my head around L1 just fine, but how the heck is L2 the same? Or the others for that matter? Gonna stare at this for a while...
If you understand gravity wells, think of L1/L2/L3 as the shape of a saddle. If you're right in the middle of the saddle it's a pretty stable orbit, but if you get too close to any of the edges you fall right out of it. L4 and L5 are like the peaks of a mountain.
Also worth pointing out that only L4 and L5 are stable, L1/L2/L3 are only metastable where they require a bit of maintenance to stay there.
Another fun fact about Legrange Points: There's a group of asteroids called the Trojan Asteroids. There's technically two groups of these since they're stuck in L4 and L5 in the Sun/Jupiter system.