Lateral instability and tunnel erosion of a submarine pipeline: competition mechanism