I don't understand why in many suburban areas there will be sidewalk for miles, and then it will just cut off for maybe a mile or so, just to have the sidewalk pick back up again on that same road
In suburbs, the sidewalk is supposed to be installed by the contractor who is doing the building. Some of them "forget" and the inspector doesn't notice/care.
Because laws requiring sidewalks went into effect after some land was developed, and the city would have to pay for the land owner to put a sidewalk in.