Gandhi was a complex human with characteristics that weren't necessarily consistent and pointing in one direction.
The "Gandhi" we know is made to resemble a TV or movie character. "He was wise, principled, pacifistic, disciplined, and a few other things. He was a saint and sage, the world's ultimate pacifist, and a proponent of universal love." The public constantly depicts people as consistent with general qualities. It's reluctant to say, "Gandhi was a lot of things--many of which don't always seem to match each other."
Gandhi supported and directly contributed to the British Empire's involvement in the Kaffir War and World War I, he supported a version of the caste system that included a class of poor "untouchables," he had a low opinion of southern Africa's black natives, he wanted German Jews to commit collective suicide for the sake of letting Germans and the world really know about Hitler's violence, he played the role of an almost all-knowing life-director with his disciples, he caused himself and others to become severely malnutritioned, he imposed almost all of his beliefs onto his wife and children, he disowned his eldest son for wanting to get married, and he banished his second son for giving minor financial assistance to his struggling older brother.
I'm not saying this to disparage Gandhi, but rather, to point out how actual people are not that consistent.