While India is a secular country, it was formed in 1947 with the explicit goal of providing a homeland for Hindus, who made up a majority of the population in the British-ruled Indian subcontinent. The partition of India, which led to the creation of Pakistan (intended as a homeland for Muslims) and Bangladesh (later formed in 1971), was driven by religious tensions and the desire for separate homelands for different religious groups.
It's important to note that India is a diverse country with people of many different faiths, and Hinduism is not the only religion practiced there. While India's formation was influenced by the desire to create a homeland for Hindus, it has since become a secular state with a pluralistic society.