The current composition of India is a result of British Imperialism and the 1947 partition of India into India and Pakistan, the Eastern half of which became Bangladesh in 1971. If you consider the entire subcontinent as one unit — which it historically was — you see a much different picture, especially if you take into account the mass migration of Muslims from what is now India into what is now Pakistan at the time of paritition, particularly from what is known as the Hindi belt, the area of Northern India that comprises all or part of the current Indian states of Bihar, Chhattisgarh, Delhi, Haryana, Himachal Pradesh, Jharkhand, Madhya Pradesh, Rajasthan, Uttar Pradesh, and Uttarakhand, was center of Mughal power, and was (and still is, to a lesser extent) home to Urdu speaking Muslims of all castes and economic statuses.
Continuing from the perspective of seeing the Indian subcontinent as one unit, and trying to imagine the population distribution pre-partition, we'll see that a very large part of "India" is almost entirely Muslim, and other large parts of India have huge Muslim minorities. Altogether, the combined population of the contemporary nations that comprised historic India — India, Pakistan, and Bangladesh — is about 30-35% Muslim, and that includes areas of southern India that were never under the control of the Mughals in Delhi.
However, even then, Hinduism did hold a lot stronger than Zoroastrianism in Iran for instance. The reason for this is primarily pragmatism on the part of the Mughals. In Islamic law, the Ahl al-Kitab, or People of the Book are entitled to freedom of religious practice and protection from Muslim governments. The Ahl al-Kitab are other Abrahamic believers, Christians and Jews, and Hindus being pagan wouldn't have normally been afforded that status. However the Mughals did give Hindus that status, while keeping Islam as the religion of the state, because they wanted to preserve harmony in their realm and prevent rebellions. The Mughal Emperor known as Akbar the Great even went so far as to have a new religion that syncretized Islamic and Hindu beliefs created, called the Din-i-Ilahi, however it never caught on out of court and the state religion reverted to Islam by the end of his reign in 1605.
In short, the answer to your question is that the more accurate religious demography of India from a historical perspective is the demography of the unpartitioned subcontinent, which is 30-35% Muslim and had several regions that were overwhelmingly Muslim and others that were religiously diverse to the point of having no majority. Furthermore, the reason that Hinduism is as widespread as it is in modern India, and Islam is a minority religion in the subcontinent is due to the tolerance and pragmatism of the Mughal government.
Murray Thurston Titus, Indian Islam: A Religious History of Islam in India. Milford, Oxford university press, 1930
Asghar Ali Engineer, Islam in India: The Impact of Civilizations. Shipra Publications, 2002
Sir HM Elliot, The History of India, as Told by Its Own Historians. The Muhammadan Period. published by London Trubner Company 1867–1877
CB Asher and C Talbot, India Before Europe. Cambridge University Press, 2008
I discuss what parts of India become Muslim, and why, in this older post here.
Islam only really passed 10-20% of the population in a few places. These places were places that had traditionally been outside the Hindu-state system and were brought in by Sufi "missionaries", new Shariah courts, and above all accepting Islam as part of the "civilizational package" that the Muslim states were offering. Though people generally assume that Islam spread "by the sword", one historian describes Islam as being spread "by the plow", particularly in the Punjab and the Bengal frontier (areas that would later make up the cores of Pakistan and Bangladesh, respectively).