I assume one further reason why iterators should be preferred over indices is that not all collections support constant-time random access.
For example, if you want the n-th element in a linked list, you need to traverse all preceding elements (with indices 0..n-1) until you get to the n-th element. (This operation takes linear time.)
An (sequential) iterator remembers where it is in a collection and doesn't always have to start again from the beginning when you want the next element. In your example, you don't actually need to access the characters in a string in random order, but only sequentially, so using an iterator will almost certainly be faster (constant-time).