I'm not sure what parts of London you were in, but there's many trees in London on sidewalks. There's even a specific species for it - the London plane (Platanus × hispanica)
If you're in the very new, constantly rebuilt, concrete jungle that is the very small part of the city, then OK, greenery is going to be hard to spot. Particularly as they tend to nearly always choose the wrong species to plant and aftercare is an afterthought. But your assessment is factually incorrect.
See for yourself. Go to Google maps, drop a good few street view randomly around the city and you'll see that more often than not you'll see trees.
Also, I have a networks in arboriculture who work in the city and they're never short on work.
I'm not doubting your experience of unease or a concrete/glass wasteland (that's yours and not mine to question) but the facts don't support the statement of no random trees on pavements (side walks).
I live in the North, but I'm often in London.
I'd echo the gp's thoughts. There are parts of the City and the West End that are basically devoid of trees.
My biggest bugbear in London is the number of developments that have a "token tree" with one lonely tree in one corner, often doing quite poorly, presumably included to check some item on a planning consent checklist.
Of course, London has many green spaces and on the whole has plenty of trees, it's just they're quite unevenly distributed.
I don't think the point is that London literally lacks pavement trees. As you say, the London plane is almost part of the city's visual identity in many areas. The interesting thing to me is how uneven the experience can be
open Google maps at Monument station, find a tree in the area. all the streets in that region of London (let's say 1 sq km) are quite narrow, I would guess there just is not enough space for street trees.
The City of London, aka "The City", aka "The Square Mile" is not the same thing as Greater London or even what's usually called "Central London." I don't think "Central London" has an agreed exact definition, but it's likely what you thought the parent post meant.
The City is a specific area, more or less covering the same area as the original Roman city. It's the original financial district - though a lot of that moved to Docklands at the tail end of the 1900s.
It's much more built up than even adjacent Westminster ("The City of Westminster") and definitely has far fewer trees.