How to output images as figure/figcaption

add_theme_support( 'html5', array( 'gallery' ) ); or with another arguments such as search-form, comment-form, comment-list and caption, its call as Theme Markup

Added gallery and caption support was introduced since WordPress version 3.9.

As of version 3.9 WordPress uses <figure> and <figcaption> elements,
instead of the generic definition list markup to output galleries. More on this in the Make WordPress Core article. ~ WordPress

add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 ); was default filter in WordPress ( see https://core.trac.wordpress.org/browser/tags/4.4.2/src/wp-includes/default-filters.php#L441 ), thats why you can find it out in theme. With function image_add_caption, it will add shortcode in image.