It's not how it benefits Hungary, but what benefits Orban. He's playing the playbook we're all to familiar with lately of antagonizing allies while warming up with Putin. It allows him to solidify his base while attacking the principles of democracy that might threaten his position.