I don't think this would happen often. I found this behavior when I was experimenting strange things.
See the image. Kill the two underground belts in the middle and the other belts got connected. And the new direction is kept if rebuilt by bots.
[0.12.29] [Michal] Underground belts may change direction if rebuilt
Re: [0.12.29] [Michal] Underground belts may change direction if rebuilt
Thanks for the report. Fixed for 0.13