The AEM Groovy Console provides an interface for running Groovy scripts in the AEM container. Scripts can be created to manipulate content in the JCR, call OSGi services, or execute arbitrary code using the CQ, Sling, or JCR APIs.
Therefore the content structure and ACLs below /var must be created via repoinit. For the samples I would recommend to just move them to an immutable location (/apps/groovyconsole/samples).
AEMaaCS has a restriction when it comes to the /var repository location: https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/debugging/debugging-aem-as-a-cloud-service/build-and-deployment.html?lang=en#including-%2Fvar-in-content-package.
Therefore the content structure and ACLs below /var must be created via repoinit. For the samples I would recommend to just move them to an immutable location (/apps/groovyconsole/samples).