I generally prefer to walk by a lane of parked cars than walk so close to a lane of moving car traffic.
An extra-wide sidewalk with trees and other decoration or a well-protected bike lane can provide a similar benefit, but parking isn't the worst option.