How did an absolutely zero-ideology party like Congress come back to power? The congress party was totally written off and the party was the first to be surprised when it won the elections. How? Simply because of lack of alternatives. After a while, people want change and there is no other viable third alternative.
You may write off the BJP since you seem to take pleasere in doing so, you may even write its obituary, but surely, the BJP will be back in power in the next election, notwithstanding its internal squabbles. If even a notorious infighting ridden party like Congress can bounce back, why cant a much less strife-ridden BJP?