Sidewalks are for pedestrians and streets are for vehicles, with bicycles being in the latter category. Granted, if it wasn't for my father being a cop, and a bicyclist as well, I probably wouldn't know that either. I doubt many people know that law since it is rarely enforced outside of harassing people deemed suspicious.
It is really a stupid law, and I break it regularly when on busy streets with open sidewalks next to them. Fortunately, being your basically your average white middle class man, cops have no reason to consider me suspicious, but I do empathise with all the other people who do get harassed over such nonsense.