A page must belongs to a specific site, that mean you need to ensure that site exists before creating the page. User site is creating lazily using UserSiteLifeCycle class, lets look at it in the GateIn source code.
The "root" user has a pre-defined Site due to the configuration in https://github.com/gatein/gatein-portal/tree/master/web/portal/src/main/webapp/WEB-INF/conf/portal/user/root
Other user that don't have config files, their user site and dashboard page will be created when user click on the Dashboard menu. If you need to create user page programatically, you'll need to do it just like UserSiteLifeCycle do
I mean you can follow the flow of UserLifeCycle ,but you should use Public API as much as possible