Config.php: apps folder writable?

Hi,
I ve tried to run nextcloud with the docker official image.
First without fpm and now with fpm and nginx.
at first boot i had problems with config.php and an error message on the landing page.
The problem seemed to be that the app and custom app folder had not the good permissions in terms of being writable.
I didnt change it because i thought it was dynamically changed when installing apps but i have not really changed anything and now it is working.
Could someone tell me what is the purpose of stating in config.php if these folders should be writable or not?
Thank you