For London, the answer can be found in the history of the development of London (and the City of London).
The City of London "contains the historic centre and central business district of London. It constituted most of London from its settlement by the Romans in the 1st century AD to the Middle Ages." (Source: Wikipaedia)
Historically, what nowadays is called "East London' consisted of the eastern fringes of City of London. The locality on the north side of the River Thames. (The south side was swamp and marshland.) It was in that eastern area that the industrial heartland was centred, proximity to the docks and Thames estuary, the slum housing for workers and conditions gradually developing as far north as Islington, Hackney and so on.
The Palace of Westminster, the first palace was constructed in c11, " was strategically important during the Middle Ages, as it was located on the banks of the River Thames. Known in medieval times as Thorney Island, the site may have been first-used for a royal residence by Canute the Great during his reign from 1016 to 1035. St Edward the Confessor, the penultimate Anglo-Saxon monarch of England, built a royal palace on Thorney Island just west of the City of London at about the same time as he built Westminster Abbey (1045–50). Thorney Island and the surrounding area soon became known as Westminster (a contraction of West and Minster). " (Source: ditto)
During the 18th century, "as London's population grew, the urban area expanded beyond the borders of the City of London, most notably during this period towards the West End and Westminster" (Source: ditto.) For clean air, the well-to-do and wealthy went west.
The rest is history.
However, whether the east end of London nowadays is as poor and run-down as it was until about the 1970s is a moot point. These days, much of the area within the neighbouring environs of the City of London has been redeveloped or when not physically altered has become an expensive and desirable area in which to work and live.
Another contributory or determining factor is whether the city or town is planned or unplanned. London is unplanned: it has developed and evolved organically, growth where needed and randomly so, as distinct from imposed. Only after the town and Country Planning Act (1947?) was introduced that any attempt has been made to impose. But by then to have destroyed London and start over was not an option. And when 'heritage' was introduced, or rather the preservation of heritage, that too prevented wholesale demolition for the sake of it.