I believe that Gandhi did this spinning of yarn was in defiance of the British colonialists and to show D the ways Indians could avoid buying British cloth. In general, Gandhi led a non-violent protest against the British to try to end their colonial control of India.