The essential problem is sovereignty. Democratic nations don't want to give up sovereignty to an unelected and unaccountable foreign institution. For non-democratic nations the loss of sovereignty would threaten their hold on power. The UN thus becomes a political tool to wield in the service of the national interest.