To get the right answer to this question we need to visit stories of our gods, kings, then cultural events and festival practices.
The imagination of song and dance is always present in our/Indian culture. You can start with gods, they had special groups called 'Gandharava', 'Kinnara' 'Kimpurusha' etc.. who are skilled in singing and dancing.
If we consider time of kings, they always had dancers and singers for their entertainment. Later stages the drama companies started touring and took the stories of gods and kings as their subject of play. During initial stages there were no dialogues in the drama/play. Whole play consists of story narrated by actors by singing. With times drama companies also changed narration style and adopted more of prose than poetry, but since singing and dancing provided much needed entertainment they remained as integral part of the drama/play.
The movies are nothing but portable version of the drama/play without actors needed to enact same act repeatedly. Hence by the time movies came to India, the natural progression was to take stories from famous drama/play and improvise on them. Hence dance and song became part and parcel of Indian movie industry(irrespective of language and this also can be seen in countries which has common Indian culture example: Nepal, Bangladesh etc...). Since dance is always performed in groups the movies naturally have to adopt it by making protogonists gel in goup.