it definitely has to do with how the lane marker stripe on the road crosses into the other lane at the divider.
you can see the Tesla hugs the left line divider. When the lanes split, the line doesn't -- it continues into the opposite lane.
Regardless, that's a totally common occurrence on the road. It seems absurd that the car will trust a painted line over any type of radar or imagery showing a rapidly approaching wall...
EDIT: watch both videos again --
Notice in the video where the car DOESN'T head towards the divider, the Tesla autopilot dashboard shows that it can see the car ahead of it.
In the one where it DOES head towards the divider, it doesn't have a car in front of it to follow.
I am wondering if in the first instance, the Tesla was confused by the lines, but saw a car ahead which cleared up its confusion (maybe it weighs trailing another car as better than following lines).
In the other instance, all it had to work with was the lines (and all the radar and other stuff it has that should avoid all this...).