Many reasons, but the most important one is :
Because architecture is not all about pure practicality
It's a very subjective reason, yet, it's true enough. Not all architecture is about being absolutely practical, even though contrary to pure art they have to be to some extent. For instance, why would you need a so high roof in the entrance of many ever-so stylised buildings? There are no furniture nor giant people who will need such height, yet people tend to like them for the sake of not being cramped up in a small place.
On a broader scale, an architect will want (or not) to build such a bridge for the same reasons. For instance, for a Megacorp building with its key letter "H", one could want to play with the bridge to form the letter. Even broader, bridges such as these could be seen as the latest trend in urbanisation, and to keep up with it they decide to build many of them.
Know that in urbanisation, a lot of factors are taken into account. For a concrete example, in my city, there was a choice which was given to the town council : An upcoming subway was going to go right through the middle of the city, and they had to choose whether it should be built under or above the ground. While the project was more cumbersome and costly if built underground, it was built below anyway because it was much, much more pleasing to the eyes and didn't cut the city in half. You can see these underground and above stations photos to give an idea of how big the difference was.
My point here is that a lot of architecture choices are also about visual appeal. And if roofed pedestrian bridges are pretty at some place, then I don't see why an artistic architect wouldn't suggest it in the district's rehabilitation plan! At worst, air refreshers such as fans or air conditionners will be needed, which will only add a minor cost to the project.
Other specific, minor reasons in disorder
- Because you cannot build underground passageways, such as when subway rails go along the road.
- Because it's warm, but also overly humid. What's worse than feeling your sweat over your transpiration? It's to be drenched to a mossy hell by near constant rains.
- Because you can quickly travel between high-floors of megastructures without burdening elevators and stairs.
- Because it's a high-tourist pathway, and it gives you a panorama of the city, without strong winds.