Seems like something that might be resolved if you adjust zoning so people live across the alley from businesses. But then, those laws are probably there for a good reason, like protecting homes from being bought up by corporations looking to expand their offices.
Don't know how it works where you live but here it's not just big zones, every building and plot has a designation (home, office, commercial, mixed residential + offices, commercial ground floor + residential above it), when you want to change the building or build a new one you need a building permit and ask the city for a change in designation, which they can deny.
We're terrible at urban planning, but that part I think does mean it's preventable.
Seriously it takes a bit of paint, a few flowers and sunshine to turn the upper alley into something similar to the one below. Oh and ban cars from it as well, whilst you are at it. All of that would be extremly cheap.