Why do you think they're ever illegally on the sidewalks in the first place? Probably because the road is, to them, more dangerous than them being on the sidewalk.
While there are imperfect operators of every mode of transportation, don't forget that also applies to drivers and pedestrians.