A word which denotes that which must be as it is without the possibility of being otherwise.
It is opposed to contingency, a state or condition or event which need not be as it is, and hence may be, or might have been, otherwise.
Logical or mathematical necessity is that which unavoidably, unalterably follows from accepted principles or postulates.
Physical necessity is but the constant behavior of the things of nature; thus, the sun must rise.
Moral necessity is obligatory conduct for beings possessing free will.
Thus, it is morally necessary to keep promises and contracts.
New Catholic Dictionary