It is not needed for the WebUI. But in the moment you use occ in the SSH Konsole, it will search the data directory at the path given in the config.php - and will obviously not find it there, because of the chroot environment.
What is '/var/www/vhosts/hosting160002.a2f36.netcup.net/httpdocs/some.host.de/data' for the WebUI is '/httpdocs/some.host.de/data' for occ.
If you use the data.config.php mentioned above, the script assumes, that the data directory is in its default place inside the Webroot. So you oviously would have to change it to someting like given below for your case:
<?php
$CONFIG =
[
'datadirectory' => realpath(__dir__ . '/../../data'),
];
the script is lying in the config directory, so you have to add the relative path from config directory to the data directory, which should be like above in your case, if I get your paths right.
This will work in the WebUI and in the console with occ, because the relative path from .../main/config to .../data is the same in both cases and the realpath function does the rest to make it an absolute path.
Edit: the code above should result in
'/var/www/vhosts/hosting160002.a2f36.netcup.net/httpdocs/some.host.de/data' when used via WebUI and
'/httpdocs/some.host.de/data' when used via occ
Quite an elegant solution, cudos to KB19