I don't understand what the use automatic differentiation for in this context.

Some use cases and examples are provided here: https://www.tinyvolt.com/blog/bringing-autodiff-to-geometry