It's an attempt to make skyscrapers look or announce themselves as eco-friendly, plus the whole wow factor about trees in the sky etc.
In reality it's much harder to do in temperate countries (four seasons, more fragile if outdoors), or in places where the associated fees for upkeep
is deemed too expensive (or not but just cut entirely by stingy bosses). In many cases it was never really considered but managed to get them past
the council approval stages.
In my own city, the gherkin was originally meant to have a spiral of 'green lungs' making use of the eco-friendly natural air conditioning, that would
cascade gardens throughout the building in breathing spaces.
But then they found it much more in keeping with the corporate tradition and profits to just extend the office space, carpet the remainder and leave it bare.
One Churchill Place was sold as having a series of interior gardens, even after losing its exterior fins
But the same thing happened
16-19 Canada Square was originally intended to be entirely cloaked in greenery, supported by a web of exterior fins for the plants to cling to. In the event, they decided against:
The Broadgate centre during the late 1980s and early 1990s was once a riot of cascading greenery and trees-on-buildings, with plans for it all to cover them like a lost city within a decade (complete with giant greenhouse garden lobbies)
In the later 90s though growth was severely clipped in keeping with 'corporate sensitivities':
By the teenies they were all but gone
The buildings replaced
The walkie talkie was meant to have a free, public access Sky Garden, which won it approval despite its unpopular shape (wide and squat) on the skyline (it's proved so unpopular that they've reopened the ban on any tall building in the vicinity to break up its disfiguring profile).
Initial renderings:
The reality was somewhat different (ticketed event to be booked in advance, limited spaces), and given over almost entirely to an overpriced restaurant,
"more like a hotel lobby than Kew Gardens":