When there is a sidewalk, it is pretty obvious what to do, you walk on the sidewalk, but what if there is no sidewalk?
"If no sidewalks exist on the road, it is recommended to walk facing oncoming traffic on the same side of the road as the oncoming traffic. Also, you should get as far to the side of the road as possible to provide additional space between you and oncoming cars." (Source)
One, this is so you stay out of the way of cyclists who are supposed to be on the right since they are considered a vehicle. (Also will prevent you from getting hit by a cyclist!)
The other reason is because if you are walking or running on the right, you can not see the car coming behind you and you are putting all your trust in them to see you, and if they do not, you are going to be hit! You walk towards traffic because this allows you and the driver to make eye contact, but if the driver does not see you, at least you see them and can jump out of the way! Trust me, I've had to do this a couple of times, usually when there is a turn in the road since the oncoming car can not see you till they turn the corner, and if they are going too fast, they probably will not be able to dodge you!
Many states even have laws regarding walking on a road without sidewalks, since I live in Minnesota, here is what our state website has posted:
"Pedestrians when walking or moving in a wheelchair along a roadway shall, when practicable, walk or move on the left side of the roadway or its shoulder giving way to oncoming traffic. Where sidewalks are provided and are accessible and usable it shall be unlawful for any pedestrian to walk or move in a wheelchair along and upon an adjacent roadway." (Source)
Yet I see so many people walking or running on the right, and because of it almost get hit! I also have the trouble of walking right into someone because they are on the wrong side, which can be problematic when you have a dog who wants to play with everyone! Often I am forced to move to the right to avoid this and hate doing so because I wasn't the one breaking the rules!
Please look up your state laws regarding walking and running when sidewalks aren't present to make sure it doesn't say otherwise, but for those who live in Minnesota, please walk on the left when a sidewalk is not present! It's safer and you will be following the law!