What is the correct way of adding a page by code?
Create a page.
Set Visitor access for the page and all subpages.
Set Write Access to Admins for the page and all subpages
Handling different versions, publish, save a draft, etc.
In order for back office to have the same content from the changes you made in code, a good idea is to make the changes to a DraftPage of the new page you created and then publish that one.
var draftPage = _draftPageService.Get(page.SystemId).MakeWritableClone();
// make changes
_draftPageService.Update(draftPage);
_draftPageService.Publish(draftPage);