Based on my own observations I don't think cyclists always appreciate the risk to pedestrians. Cyclists can wear protective gear, are more maneuverable and can choose to bike only when healthy. Pedestrians might wear only a t-shirt and shorts and can have any number of invisible health problems. People die or end up in the hospital from simple falls, now imagine having a bad hip and being slammed in the back by an adult going fast on a bike and being thrown into traffic or head-first into a parked car, bench, pole or some random junk on the ground. Instead of arguing over whether being hit by a car on a bike is more/less dangerous on average than being hit by a bike as a pedestrian, I hope we instead can agree that either type of accident has a very real risk of serious harm or death, and better infrastructure for bikes would reduce both types of accidents.
I acknowledge it's very difficult to bike safely on the sidewalk. You need to assume you'll have to dismount and walk around every pedestrian. The exception is if the pedestrian clearly sees you, moves aside and signals you forward. If you can't or won't constantly dismount, you're putting other people at risk. That's just how it is. Dinging a bell or shouting "passing!" two seconds before reaching a pedestrian who is in the middle of the sidewalk, who might be wearing headphones, is not sufficient. Unfortunately a lot of cyclists put other people at risk instead of finding alternative transportation. I'm not saying you personally ride unsafely, of course.