A simple answer would be that the tubes were caused by lava flow, and were later filled with some kind of looser material. Then the one time water flow washed out the loose filler and left the trench behind. The reason why the trench appears to end on both sides (but especially in the direction of the volcano) is because the tube goes beneath the surface where it came from originally.