Why do guys do this?

idk how to say this but when I'm walking near a guy or I see guys walking sometimes they do like a weird step to like the left or right and then continue walking straight. I asked my guy friends why they did this and no one told me why 💀 I'm honestly confused but I'm not sure if I want to know the answer or not cause they refused to tell me😭