<?php language_attributes(); ?>在html标签上

I am trying (really hard) to understand what I do in wordpress (I am newbie coding). And I am having a problem just at the start.

ON the header.php I've seen:

enter image description here

But I don't understand why it is better to add it or what it does. I have checked it on wordpress codex and my understanding is now even worse!

Description: Displays the language attributes for the tag. The possible language attributes are dir (text direction), lang and xml:lang. The choice of lang and xml:lang depends on the $doctype argument.

So, what does it do? why is it better to use? do I have to set language_attributes function anywhere? Can someone explain it as they were explaining it to a child?

Thank you, it is really stressing me!!

<?php language_attributes(); ?> adds the lang="en" attribute to your html element. This is used to indicate (e.g. for google) in which language the content of your page is.

See What is lang attribute of the <html> tag used for?

It also adds the dir="" attribute to your html, which idicates, if the text on your page is written from left to right (e.g. english, german, french, etc...) or from right to left (e.g. arabic, etc..)