I would bet this law has more to do with texting in certain situations, like walking along a train track (really, nobody should be doing that period), crossing a street, walking along a busy street, through a parking lot, etc. It's not an issue if a street is wide enough with few cars and plenty of space on the sides, or walking through a park or on campus, etc.