What is more rational than considering the existential defense of one’s nation? Right now, Ukraine is in an existential war. If they had kept only say... 10 of those nukes... they’d be exchanging mere unpleasantries and nasty words.
Again, you have to look at it from what we knew 25 years ago. We didn’t then nor today want to have more nations with nukes. It’s the genie that’s out of the bottle and can’t be put back, but it can only get worse with proliferation.