Yes, but the reason why biking on the sidewalk is illegal in most places is mostly unrelated to safety.
The only bicycle riders willing to get organized and lobby the legislators are the very most serious ones. These are the people who want to race along at 50 MPH.
The resulting laws force pitifully slow riders to be out in the street. Even if you can only manage 5 MPH, you have to be in the street.
Lots of us are too arthritic, too fat, too weak, too inflexible, too limited by lung capacity, too limited by heart capacity, and too limited by cheap steel mountain bikes from Walmart.
So our choices are:
a. break the law
b. annoy drivers and risk death
c. don't ride a bicycle