I don't know the story behind the structure, but it was a re-purposed storage shed [2] that someone was either subletting or owned outright. Probably the former -- the area is not remote, and is surrounded by new housing. Most likely is that some landowner is making a little bit of cash by renting out the space, and the business owner is exploiting the niche of having a cheap property so near to Nijo castle (a tourist black zone in Kyoto).
Setting aside the aesthetics, the most "Japan" thing about this is that it's possible at all to get a license to run a food establishment, electricity service, etc. in such a marginal space. It would never be allowed in the US.
Secondarily, leaseholder rights in Japan are pretty different than in other parts of the world. It's fairly common, even in major cities, to find underdeveloped, tiny little plots of land where there's a lessee who has a ~perpetual right to the space, independent of the "owner". Landowners will buy and sell the underlying rights to the rental cashflow, almost like a long-term bond, with no hope for redevelopment, and the lessee can independently sell the rental rights [3]. Again, I don't know if that's what is going on here, but it wouldn't surprise me. These kind of situations make it feasible for a business owner to invest in creating a business in what is essentially a potting shed -- one of the major risks would be that no one rationally would want to keep that old building in place in an area of Kyoto that could be more fully developed. But as you can see, this building is completely surrounded by new construction, and has been for many years.
[1] It's here: https://maps.app.goo.gl/3KtWnTAkmatMqN9b6
[2] I could be wrong about this part. The roof is tiled, which is pretty fancy for a shed. My recollection was that it was far too small to ever have been a house, but it's possible that it was originally a section of a larger machiya, which would make sense for the area and the geometry of the lot.
[3] This is sort of like mineral rights or air rights in the US. It's not a totally foreign concept to us, we just don't do it for houses or...shacks.
This streetview gives a better perspective on exactly what is around it -- you have new development in front and behind, and the area immediately to the front of the shop is a dedicated parking area for a nearby business. I suspect that the shop and the parking area are part of the same parcel, owned by the business.
https://www.google.com/maps/@35.0112669,135.7504895,3a,89.9y...