At 45 Franziskaner Strasse in Munich, during the war, people fled to shelter in neighbouring buildings, escaping via underground tunnels, to avoid being stopped in the streets. Some of these tunnels were built as early as 1700.
Today the galleries and tunnels are still there, underneath modern buildings, houses, shops, that more often now, need to expand in order to accommodate new tenants or new businesses.
Already crowded city centres cannot spread outside, there are streets, parking bays, sidewalks and generally little space. So the courtyard is the only available choice.