The directional bristles for anchoring to dirt (more noticeable on the larger earthworm species) are the remnants of polychaete parapodia. Similar to snakes that occasionally have remnant claws.