If you find a punctuation character, you erase it. That's fine, but what happens is the next character is moved into the position you just erased. If the next character is also punctuation, you going to skip over it because your for loop is going increment i so the next iteration will look at the character after the one that was just moved into the erased position.
It's better to use a while loop for this kind of scanning. You only want to increment i when you find a character that is not punctuation.
It erases the i'th character for a length of 1, then decrements i. This accounts for the fact the i is incremented regardless of whether you found a punctuation character or not. As I pointed out above, you want to increment i only when you don't find a punctuation character. By decrementing it, you're essentially not incrementing i for that iteration of the for loop.