The brave and openhearted king Ram becomes Lord Ram, Shrewd strategist and warrior Krishna becomes Lord Krishna, Humanitarian and benevolent Jesus becomes son of god. Some fly on a winged horse to heaven, some walk on the water, Shivaji's vision and valor is attributed to the divine sword given to him by the goddess and some try to build temple of Dr. Ambedkar - one of the best leaders of 20th century.
Humans have this habit of idealizing someone to the extent that after some generations that someone is deemed as either god or saint. Once someone is declared as god, or saint, whatever he has done in his lifetime becomes supernatural and the masses are relieved of the responsibility to walk the path these great people had once taken. Though unknowingly, we always want to attach some miracles to the extraordinary lives of our heroes so that our own failures and immorality can be rationalized.
We should look at these people as people not gods. This is important because then and then only we will try to mimic their life. If they are considered as gods, everything becomes superhuman. The goal should not be worshiping them but to follow them.
People would have definitely built a shrine of Gandhiji too. But he did a really brave thing. He wrote his autobiography blatantly, without considering what others would think of him. He paid the price for it. Some people still refers the bad parts in the book - "My Experiments with Truth" to defame him but I guess that's what has kept Gandhi as human till date.
If you read the biography, you might feel disgusted at times especially during the first few chapters. However, once the South African part starts, you cannot help but to feel awe for the man. We all know about his tenure in India, before that, he was in South Africa - As he wrote in "The Story of My Experiments with Truth", this part is about his successful profession, awesome financial status (He let go 1000 pounds on a vegetarian restaurant, bought 100 acres for his settlement for 1000 pounds, he had a secretary whose monthly salary was 17 Pounds..so compare.), his Indian and British colleagues/employees, how he served as a medic in British-Zulu war for 4 weeks, nursed highly contagious black plague patients, organized so many people to fight against the discrimination, brought justice to them, established newspaper firm (Indian Opinion), settlements (Phoenix, Tolstoy) for Indians.
He made several mistakes as a child, despite of that, in adulthood showed great leadership even exhibiting compassion and honesty in whatever he did. He kicks the butt of all those Politicians who claim that dishonesty and deception is necessary to be successful in politics.
Back to the character flaws -
I find him eccentric when he explains his stance on Chastity. He pledged celibacy in a ripe age of 40s. He said it was important for the purity of mind. However, many of his followers were still young at that time. He himself couldn't control his sexual desires when he was young, how he could expect these young lads to practice chastity for the purity of mind?
Same is with his experiments with alternate medicine. Once he treated his own son with water treatment which seems like a voodoo practice rather than curing treatment.
He was against drinking milk. He considered whatever a baby gets during its early days from the mother is enough for the entire lifetime.
I used to think that he was too adamant on the non-violence. Especially the way he ended the nationwide non-cooperation movement after a single event of demonstrators turning violent during protests at Chauri Chaura incident. However, I think that he was right. British had got all the reason to eliminate the movement brutally which would have resulted in large number of casualties from both sides and anarchy in the end. India might have got independence in the bloodshed, but the anarchy would have resulted in numerous micro nations in Indian subcontinent.
Similarly, whatever controversies he has on his names, if I think deeply, I find that he did whatever he could have possibly done to improve the situation.
Part of the my answer to the question on Quora-
"Did Gandhi, despite being the greatest mass-leader in the entire history of humanity and being a great man, have some major character flaws?"