Ghandi was the leader of the Indian movement for independence from England. His philosophy was one of non-violence. Although it succeeded eventually, it was not always popular among Indians or immediately effective in its time. But history has raised Ghandi to an almost mythological plane, and his eventual success has inspired other movements, such as the Civil Rights Movement in the United States.
I think the point that Ghandi wants to make with the quotation you have provided is that non-violence is a choice based on his values and his sense of right and wrong, and also his belief in what will be successful. So for the first blank, I would use the word “necessity.”
Ghandi knows that protesters and revolutionaries have several strategies they can follow. Many successful revolutions throughout history have been violent and bloody. In his desire to avoid this bloodshed, he knew that he had a choice in his methods. It is also possible that, in this age of mass communication, Ghandi knew that his message would be spread quickly and thoroughly. Instead of taking months and years to let the world know what is going on, it can happen via radio and newspaper almost immediately. This makes non-violent means potentially more viable than they would have been previously. Since Ghandi is carefully considering what route to take, I would use the word “choice” in the second blank. That would create the following statement:
Gandhi says this to point out that his belief in non-violence isn't out of necessity, but out of choice.