However, if the 5V feed to the opto-coupler should increase (such as it's fed from a different 5V source that goes high), then that voltage will feed through the protection diode in the PIC and increase it's supply rail, possibly to destructive levels. A series resistor limits the current, and prevents this.
...
Particularly if the PIC was running off 3.3V, and the opto fed from 5V