Peter the Great started then Catherine II was often calling on French writers, poets and philosophers to perfect the Russian aristocrats in their usage of French language especially as her opponents were considering her as a foreign Tsarina. Diderot spent some time at the Imperial court of Catherine II who also wrote often to Voltaire as both were not so welcomed in their own countries at that time.
Some historians point out that France was then a symbol of progress and the Emperors and Empresses of Russia wanted to modernised their growing Empire while strengthening their own positions. This trend was almost halted at the French Revolution, especially in 1793 when the then French First Republic decapitated the King Louis the XVI when he was trying to escape out of France.
But still, French language was well considered after Napoleon was defeated in Moscow in the beginning of the XIX century in 1812. For example, the novel Война и мирWar and Peace (war and peace ) was initially written by Tolstoy in French in its original Edition, like the full first chapter then part of the second chapter and more fragments in the rest of the novel. And France was considered as a strong ally during the rest of the century.
I also heard a story from my Russian law school classmate whose grand mother had been studying French at the high school and had helped her struggling classmates as her family had kept this grand passion for French language and France where she finally settled in the 1930′s.