Earlier quoted context omitted.
That obviously makes no sense. A club isn’t a sovereign entity just because it has rules. Hungary is free to leave the EU and set a border policy that conflict with EU law if it wishes - but if it wants to remain part of that organisation, particularly one that has open borders thorough The Schengen area, then of course it needs to follow the rules.
As UK showed, leaving EU is hard and EU will fight you on it as well as seek to penalize you
It being “fought” or countries being “penalised” is a matter of opinion but not one I share.