My assumption is something like this: hacking is illegal in Russia, Russian gov is corrupt, hacking groups operate within Russia, they are profit driven, Russia accepts this so long as Russians are not targetted and that useful intel is fed back to Russian agencies.
Now to research to see how this hypothesis plays out.
You are right.