I'm not sure if this is explicitly written, more accurately, not written into the zoning laws, but in general, residential and commercial properties are fairly mixed in Japan. I live in a fairly residential neighborhood, but even here we have little pockets of business. Around the KGU dorms, there are houses and businesses in about a 50/50 mixture. It's also pretty common to see a tall building with a restaurant or liquor store at street level and apartments above.
The building pictured here is near my house and is an interesting fusion of a residential home with a commercial facade facing the street.