That's a very obvious fallacy. Women's suffrage used to be legal, therefore all laws are wrong? or, the law I don't like is wrong?
It's illegal to hold a vote like this in North Korea too and the judicial process would be similarly "forced" to follow the law. Still democratic.