I think you don’t understand how indian political system work. In India the Prime minister is elected by the people and has a similar position to the President of United States.
Modi’s party got majority seats in the previous election.
The President of India is more of a ceremonial role. It is one of the duties of the President to appoint the Prime minister. In this scenario the President really doesn’t have a choice.
In hindi we call it “old lady hair”