In nineteenth century Russia the aristocracy used French almost as a first language. French culture was widely admired and emulated in aristocratic society. At this time Russian literature had yet to develop, so French writers and philosophers such as Montesquieu, Voltaire, and Rousseau were particularly influential. Russia was considered not entirely 'European'; by the standards of the time this meant not entirely civilised. The adoption of the French language was an attempt to combat this perceived inferiority.
Tolstoy himself was an excellent linguist who knew Russian, French, English, Arabic, Hebrew, Ancient Greek, and German. Although he was extremely familar with French, he disliked its widespread adoption in Russian society. When Tolstoy has a character speaking in French it is an implied sign of insincerity or inauthenticity.