I think mostly because the Allied Powers won WWII and got to make the rules. Often the argument is made that, by giving the nuclear-capable countries veto power, they’re less likely to use those weapons, but that might be more of a rationalization than the actual reason.