Mapping the sidewalk as a separate path is not incorrect and makes sense for various reasons, such as accessibility information. For further information see here: https://wiki.openstreetmap.org/wiki/Sidewalks