Why are Index Registers needed?
Observe:

     LDX #0
     LDB #5
     LDA #0
loop STA buf,X
     INX
     DEB
     BNZ loop
     RTS

buf  RESB 5


This simple example clears out 5 bytes in a buffer. Without indexing the operation STA buf,X would require modifying the code itself, which as any seasoned programmer knows is evil, and isn't even possible on some platforms.