The observation is correct. In many cities, older wealthy neighbourhoods are in fact often adjacent to older, poorer neighbourhoods. Many years ago, when cities were becoming more populated, due to the Industrial Revolution (the movement of families from farms to cities), wealthier families had house staff to do household chores like cooking, cleaning and laundry. Often times these jobs entailed very long hours. At this time, cars were rare, so the household staff would often walk to work.
These two different socio-economic neighbourhoods were established next to each other due to convenience/accessability. If the household staff lived many miles away, it would be difficult to commute to work and they would lose their jobs.