Jumping spiders are extremely intelligent for their size. Something they do when they encounter a complex problem is sit and apparently simulate potential solutions until they settle on a plan.
Their solutions can involve indirect routes, paths that initially increase the distance to their targets, etc.
Walking, or jumping, is inherent to their existence. But the ability to wait and iterate on possibilities is uncommon strategy for tiny things.