Another function of the UN is to make diplomatic relations between all countries more legible. When everyone is forced to vote yes/no/abstain this information leaks out in a coordinated fashion. Whether that’s good or bad for world peace that’s another matter.