Yes—most wooden benches you see in cities are made from wood that has been treated to resist rot and insect damage. In a public setting, untreated softwood would start decaying within a few years, especially where the legs touch wet pavement or soil.
The most common method is pressure treatment. The wood is placed in a vacuum-pressure cylinder and preservatives are forced deep into the grain. Modern preservatives, such as copper azole or ACQ, are much less toxic than the old CCA treatments and do a solid job against fungal decay, termites, and carpenter ants. You will often see a greenish or brownish tint and small incised marks on the surface.
Some cities skip chemical treatment and use naturally durable hardwoods like teak, ipe, cumaru, or black locust. These woods contain natural oils and dense fibers that resist moisture and insects on their own. Others use thermally modified wood, which is baked at high temperature in low oxygen. This changes the wood sugars and makes it less attractive to fungi and bugs.
There is also a difference between treated and maintenance-free. Even pressure-treated or naturally durable benches benefit from periodic cleaning, recoating with a water-repellent sealer, and keeping the feet out of standing water. No wood is completely immune forever, but a properly treated urban bench can easily last 15 to 30 years outdoors.
So if you are asking about a specific bench: yes, unless it is made from untreated pine or another non-durable species, the wood has almost certainly been treated or selected specifically to handle rot and insects. If you are buying or building one, look for stamps like ground contact rated or labels that name the species and treatment type.