Some Lemming, who I'm sorry to say I can't properly credit due to a shit memory, once put it like this.
The UN wasn't created to stop war, it was created to stop another World War. Giving a veto to a country that has nukes and/or could sustain an extended war against the rest of the world is primarily meant to achieve this goal. And in that regard, it has worked decently.
And while I think that this being the "best compromise" humanity could make sucks ass. The cold logic of it kinda made sense to me.