Optional packages are currently only offered when the package file is uploaded manually.
Directly bundling packages has various issues, especially when delivering via the package server. Instead, recommended packages could be listed in package.xml and offered to users during installation. These packages are never part of the package file but are always obtained via the package server.
ref https://www.woltlab.com/community/thread/298687-optionale-pakete-auch-bei-storecode-anbieten/