A motor drive can command speed and position, but it needs feedback to know whether the motor followed those commands.
Encoders give the controller position and velocity data so it can correct for changing loads and maintain repeatable motion.
The Same Sky blog post, Intelligent Motion Starts with Feedback: Why Encoder Technology Matters in Modern Motor Drives, covers the role of feedback in industrial drives, including the practical differences between capacitive, incremental, and absolute encoder approaches.