why is this query returning entire blog-posts

The snippet below from the codex suggest that it would just display the first sticky post. If there are none, it wont return anything. Whatever your use case is please apply the logic accordingly.

$sticky = get_option( 'sticky_posts' );
$args = array(
    'posts_per_page' => 1,
    'post__in'  => $sticky,
    'ignore_sticky_posts' => 1
);
$query = new WP_Query( $args );
if ( isset($sticky[0]) ) {
    // insert here your stuff...
}