Given this paragraph about Mahatma Gandhi, can you tell me why did he go to London?

Gandhi had dropped out of the cheapest college he could afford in Bombay.[71] Mavji Dave Joshiji, a Brahmin priest and family friend, advised Gandhi and his family that he should consider law studies in London.[72][73] In July 1888, his wife Kasturba gave birth to their first surviving son, Harilal.[74] His mother was not comfortable about Gandhi leaving his wife and family, and going so far from home. Gandhi's uncle Tulsidas also tried to dissuade his nephew. Gandhi wanted to go. To persuade his wife and mother, Gandhi made a vow in front of his mother that he would abstain from meat, alcohol and women. Gandhi's brother Laxmidas, who was already a lawyer, cheered Gandhi's London studies plan and offered to support him. Putlibai gave Gandhi her permission and blessing.[70][75]

On 10 August 1888, Gandhi aged 18, left Porbandar for Mumbai, then known as Bombay. Upon arrival, he stayed with the local Modh Bania community whose elders warned him that England would tempt him to compromise his religion, and eat and drink in Western ways. Despite Gandhi informing them of his promise to his mother and her blessings, he was excommunicated from his caste. Gandhi ignored this, and on 4 September, he sailed from Bombay to London, with his brother seeing him off.[74][71] Gandhi attended University College, London, where he took classes in English literature with Henry Morley in 1888–1889.[76]

He also enrolled at Inner Temple with the intention of becoming a barrister. His childhood shyness and self-withdrawal had continued through his teens. He retained these traits when he arrived in London, but joined a public speaking practice group and overcame his shyness sufficiently to practise law

Gandhi travelled to London in the late 1880s to study law. He first took English literature classes and then enrolled in Inner Temple with the intention to become a barrister.