It comes from ancient times. First, let's start with the fact that after the October Revolution, the appeal "mister" and "mistress" (in Russian it sounds like a "lord") were in fact taboo ("Sorry, mister...", "All misters fled to Paris!"), and the official appeal was "tovarisch"(comrade). After the abolition of the communist system, word "tovarisch" also almost ceased to be used (
and btw it is very pitiful - "tovarisch" is a noble ancient word meaning friend-associate in difficult business, campaign, field military service - Robin is tovarisch of Batman, hobbits going to Mordor were tovarisches to each other), but the appeal "lord" did not return as it is - it is rarely used.
But also before the revolution use name and patronymic implied a very respectful attitude. On the one hand it is respectful, but on the other hand it does not sound cold-official, that the Russians didn’t like very much at all times. For example, the peasants turned to their lord by the name of the patronymic cause it was emphasized that he was not just their lord, but kind off their father. Or if you read Tolstoy, for example, "War and Peace" there is the highest aristocracy, also often refers to each other by name patronymic, especially if it is not cold-official St. Petersburg but Moscow (which in those days was not the capital). Because it emphasizes the narrowness of their circle, that they are like a big family for each other.
Everything remained so nowadays - respectful and, let's say, a confidential appeal is made using the name of the patronymic. At the videoconferences with the president, no one will say "Mr. Putin", everyone turns to him "Vladimir Vladimirovich". Cuz he is kind off global father of country

You cannot call your teacher or coach by last name - this is not accepted, and it somehow shows that you do not perceive him as a person, but only as a function - a teacher, a coach, a president. And this is extremely unacceptable in our society.