For those who aren’t familiar with the biblical story of Samson, do note that it is about a man who fell from grace, was imprisoned, degraded, and then begged God for the strength for one last act of defiance. He brought down the building around him taking many of the enemy with him. He did not survive.
This is how Israel views their nuclear deterrent. It is there for one last act of defiance that they do not expect to survive.
Also note that unlike Iran, Iraq, or North Korea, Israel never did sign the Non-Proliferation treaty as a non-nuclear state. However, their nuclear deterrent remains undeclared and they expect to keep everyone guessing as to what they actually have.
Thanks to Mordechai Vanunu, most nations have a rough idea of what the Israeli arsenal looks like, but the Israelis aren’t giving out any specifics.