I still think Russia was less intent on electing Trump (which I’d guess surprised them almost as much as it did us) than getting leverage over Hillary and elevating tensions with the US in order to justify Putin as a nationalist leader. The strongest recent evidence for this, in my opinion, is that right after the election the Russian foreign minister stated officially that Russia had been in contact with Trump and Trump’s inner circle in the lead-up to the election. This is not surprising as information if true (I would imagine both major party candidates speak informally with foreign leaders very often during elections; Obama certainly did in 2008.) But the last thing you would do if you had successfully installed a puppet in a foreign government was brag publicly how you had done it. Lavrov’s statement would be, again, more sensible if it was part of a general strategy of elevated overt tensions with the US; “getting tough” on the West in order to strengthen Putin’s domestic hold on power while sowing dissension within the United States.
One more note, however, that applies both to Russia’s intelligence services and to the CIA: spy agencies, like all bureaucracies, look out for their own interests, and are interested in safeguarding their own power and prestige. Even an authoritarian state like Russia can’t be reduced to a unitary actor that can be simply described as “what Putin wants.” In fact, the initial public analysis of the DNC hack that concluded Russia was responsible argued that there were two different Russian agencies involved, unaware of their own independent efforts.
This is important because one primary result of a successful hack of American political entities, aside from damaging the legitimacy of the incoming government, is to increase the importance of the people doing the hacking and the people who could theoretically head them off. To a large degree, the CIA and the FSB are on the same side, the side of making sure that intelligence and counterintelligence remain valued and well-funded. The rhetorical shift in the early 2000s to justifying both American and Russian intelligence agencies on the basis of counterterrorism has proved a failure, not only failing to stop the rise of terrorist groups like ISIS but ceding most of the potential uses of intelligence to Homeland Security and the NSA, quite aside from the moral failures of the CIA’s involvement in black sites and extraordinary rendition of suspected terrorists to be tortured in Morocco, Egypt, and Afghanistan.
From the perspective of a self-interested bureaucracy intent on safeguarding its own territory and apparent value, switching the framing of intelligence gathering away from counterterrorism and back to the good old days of Great Power cloak and dagger is beneficial for both the FSB and the CIA.