On the contrary, I think if respectfully done then passing through a cemetery is perfectly acceptable. Many cemeteries have paths through that are routinely used as thoroughfares by people going about their daily business, either on foot or bicycle. These places are not intended as places of unhappiness and desolation, to be avoided and neglected. While they are not parks, they are places of quiet and often beauty when well tended with some incredible architecture that is obviously intended to be viewed and admired. The words on headstones are often there for all to see and not just as comfort to the family involved. Cemeteries are also often a haven for nature due to the quiet and can be a great place to spend some time getting closer to the local wildlife.
In fact, I'm sure a recent CC informal ride made a thing of visiting graveyards of London? I and my family will often visit the grounds of a village church and spend some time looking at the old graves and reading the dates and inscriptions. It is a poignant reminder of how tragically short human life can be and the mortality of us all. Our time on this earth is limited, that is a simple fact, so make the most of your time here. Cemeteries are a fact of life and also a public resource/space, not just a dumping ground for the bodies at the end!