This is both an economic and political move. Sure, Russia assured herself a high economic return from her investments, but the “political” return is not less important: signing this agreement Moscow wanted to demonstrate that Russia is still able to exert her influence on the former Warsaw Pact members that are now either members of the European Union (as Hungary is) or in her political and economic orbit. It's an indirect, subtle and almost invisible kind of influence, but powerful indeed.
Some of the latest Russian political battles or decisions (from the quarrel against the European Union to win Ukrainian “political loyalty”, to the Iskander missiles deployed in Kaliningrad, to the Paks power plant renovation) are driven by the desire of reconquering the same influence that Moscow used to have in the Eastern Europe, as to remind that Brussels is not the only power centre in Europe.