get_post_format() Returns the post format of a post. This will usually be called in the the loop, but can be used anywhere if a post ID is provided. and its usually found on the posts pages/blogs.. therefore Its used in a theme when you want to display blog posts.
As you you might know that wp have different posts types. let's just take two of them.
Post (Post Type: 'post')
Page (Post Type: 'page')
get_post_format() is used to get the format of a post,(blog Post) if you open your wp dashboard and start a new post or editing existing post you will see different posts formats types
As you can see from the image above, the red highlited part is the post format, that is what you are requesting when u use
get_post_format() wp treats that template as it should display posts, but not pages.
If you want the content of the page you then need to use
get_template_part( 'content', get_post_format() );
get_template_part( 'content', the_content() );
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
echo "no content found";
<?php endif; ?>
Hope this helps, Goodluck