What is the purpose of this large structure on a Japanese hillside?
The structure looks similar to this photograph of a "Japanese land retention system" mentioned in passing towards the bottom of this webpage. From the linked page:


  Land retention systems in Japan, for example, are often designed as heavy waffle grids which are molded to the topography and cover it to a uniform structural depth.


This seems to correspond roughly to the structure in the question, although the "waffle-grid structure" is only evident in some parts.
I've been unable to find any more details online about these land retention structures and their design.

As farrenthorpe writes in a comment, the three-dimensional view is probably more informative:



At first glance the siting seems strange, since there is no major settlement or road below the structure. However, it does overlook a river which, around 3 km downstream, feeds into the Tenjin water storage dam. In the current Google satellite imagery the riverbed is mostly dry and ongoing engineering work is visible in it, presumably also related to debris/sedimentation control. Similar hillside structures can also be seen on some of the slopes around the dam itself.