It's unclear what the behavior should be if you're iterating over an array while modifying it.
What if you remove an element, should it still be iterated over?
Rather than trying to guess, the list throws a ConcurrentModificationException to cause an error rather than pass with unexpected behavior.
One solution is that you could iterate over a shallow copy of the list, and then modify the original list