In order for the UI to work on JS too, a controller must be loaded and instantiated.
Since the controller's module will be defined as package-name/module-path and the package name comes from the package.json file, the SoyPortlet bridge requires it to know how to create the script to be placed in the page.
At this line in SoyPortletHelper it is accessed and deserialized. The path where the helper expects it is in the root, as if it was src/main/resources/package.json.
That's not the case because the package.json file, required for example by Liferay Loader Config Generator, must be in the root of the project (sibling to src itself).
Currently a duplicate package.json must be placed in src/main/resources/ for SoyPortlets to work.