Posts & Pages are “built in” Custom Post Types. So something that was delivered as a pre-configuration when WP was installed. There’s also other built in stuff like Tags & Categories which are basically nothing other than custom taxonomies.
And you’re lucky: You can simply use the API and add your own, hierarchical custom “post” type.
register_post_type( 'hierarchical' => true );