Motive is less clear. In reality, they probably hacked the DNC because everybody hacks everybody; that's the reality of modern cyberespionage. America hacks the Russian political parties, they hack us back. But this time someone screwed up and they got caught, so now we need a cover story.
The coverstory of trying to manipulate the election is basically convenient for all involved. It is far fetched enough to sound unbelievable, so it provides diplomatic cover. It also provides cover for why there's no similar story at the RNC, which is better than admitting either the Russians couldn't do it, or they could and they got away with that one. It provides cover to Clinton who can now claim the Russians want to elect Trump so please focus on that instead of anything to do with email, and it provides cover to Trump who would like to keep the word email in the news. This is the story that all our characters are happy to go with.
But the Russians being the perpetrators? That part is definitely true. There is way too much evidence over way too many years. The DNC did not create a Russian intelligence organization in 2007 in order to cover up their email leak in this election.
[0] https://en.wikipedia.org/wiki/Sofacy_Group
[1] http://securityaffairs.co/wordpress/36195/cyber-crime/cozydu...