Laws aren't enough to prevent things from happening. The fact that Denmark has equality laws doesn't mean that it's gender-equal, and it certainly doesn't mean that there's no sexual harassment. There are strong social mores against murder. There aren't strong social mores against sexual harassment. Having a code of conduct helps indicate to attendees that whatever their personal beliefs about sexual harassment are, and regardless of what local laws there may be about it, it won't be tolerated.
Event terms and conditions would become nicer if they didn't list the (already illegal) things that will get you expelled from the event but just said "Any criminal act, and especially the removal by police for these acts, will result in immediate expulsion except in the sole judgement of the event staff".
Even if the event wants to say something about it above and beyond that, it frees them up to say "We all know the law on this, but to encourage our ideal atmosphere (which is X) the voluntary by attendance code of conduct will also be ...." without repeating all the mundane bits of the law.
tl;dr, don't remind me something is illegal, remind me certain attitudes are unwelcome and leave it there.