I believe that Blake wrote this poem to decry the state of people in the urban centers of his time. He argues, in the poem, that people in the cities are really badly off in a number of ways.
In this poem, Blake is saying, for example, that people are oppressed. He says that they are, essentially, living in chains. The have manacles on that have been formed by their minds.
In addition, people are in bad physical condition because of their poverty. You can see the marks of weakness on them wherever you look.
Finally, they are badly off morally. Women have, for example, been forced to become prostitutes.
All in all, life in the cities has degraded the humanity of the people who live in it.
This is, I believe, what Blake had in mind when he wrote the poem.
One can only surmise why he wrote it, but it appears that Blake was distressed probably because he believed that the human spirit was being suppressed by custom and politics. His idea in the poem was that humanity could flower if long-established institutions could be altered or removed. For this reason his poem “London” is revolutionary because it stresses the need to correct the misery the speaker describes. Those who are degraded should be healthy and wholesome. By contrast, Blake reminds us in the poem of privilege, soldiers, and palaces, all of them aspects of oppressive authority. Songs of Experience, from which “London” is taken, was a collection of poems on this basic theme. Blake published the work in 1794 (the French Revolution was only five years old at the time) with his own engravings.