Building "death tools" is not a choice
For India they had to do it because the British left them with this mess called Pakistan next door. And then they had Mao on the other side. The need for building these weapons was not a lark or an ego project but a considered decision - just like their space program. The development of independent industrial, technological and scientific capabilities was one of the foundation stones of Indian Govt policy. Self sufficiency in food was another. Today they have achieved both of those largely.
Sanitation in general is a product of their poverty - not due to lack of interest. The over-population and under funded civic authorities naturally means that that sanitation struggles to improve.