I have a friend who moved to the US from India. He says when he first got here he was frequently bumping into people in hallways and sidewalks, because his instinct was to move to the left, and as he eventually figured out, the US instinct was to move to the right.
The only reason we could come up with was driving sides and the India/British left side vs. US right side. Because he wasn't constantly bumping into people in India, lol.
Where I live, we drive on the right, but pass on the left, so I do that. For stationary or oncoming obstacles, go right; for passing things moving the same direction as me, go left.
I find that if I just pick a direction, keep walking in that direction, and crucially look away from the person (stillkeeping them in peripheral, but not obviously looking where I'm going) it almost always works out.
It's when both people start correcting for the other that the problem arises.
From a US pov, I go to the right. Why? Not necessarily because that's how drivers are etablished for road travel but because of where I'll be located on a sidewalk in relation to these drivers. If I'm on the right sode of the road, the drivers approach from behind. I stay to the right to stay further away from what I don't see coming. If on the left, I stay to the right because I can see what's coming but other's walking in the same direction of traffic can't see what approaches them from behind. I get really lost at going into building that have their entrance doors on the left/exits on the right.
For me, at least, it correlates to the direction that provides the widest/least obstructed/most visibly clear/least disruptive/least hazardous direction to give onward travel. Clearly the direction that that boils down to varies according to the individual situation.
I don't recall being alone with a single central obstruction in the middle of an otherwise deserted and symmetrical street with no other influencing factors enough times to have noted any innate bias on my part.
I don't drive, but I imagine I'd go left since people where I am drive on the right side of the road. I wouldn't want to look like Spongebob now would I?
I drive a motorcycle -- in my country the law is that bikes and traditional vehicles stay to the right and cars to the left. So to the right is generally a curb. To the left I leave enough space for someone to pass me or for me dodge optimists.