How can I bootstrap Public role to have create permissions?

This is most likely due to the permissions table not existing in the database when the bootstrap is ran, it may require a first startup to generate the permissions table then you can add it in (bootstrap is ran before the users-permissions plugin init process).

I believe in that example the initHasRun is a custom value just for the bootstrap example provided above.