That doesn’t mean you can’t have trees: a high-rise building next to a park is quite dense, as are tree-lined streets.
The problem is those streets: the 20th century model focused on maximizing individual vehicle usage, which meant lots of open space for safe operation and subsidized storage. Cars can’t go around trees like pedestrians or bicyclists and owners don’t want branches falling on their parked cars, so anywhere there isn’t enough space for both it tended to result in more heat-amplifying asphalt.