I can see his brilliant reasoning in this:
"An incredibly powerful new army just conquered all of Visigothia. They are on my border and launching sporadic raids across it. What should I do? Fight back? No! I have a better idea. I will allow this hostile foreigners into my kingdom, and give them control over my government while they retain an army that rivals my own right across the border. What could possibly go wrong?"
And I think the Rajputs would not be as much of a pushover as you suggest. They resisted most other conquerors for centuries, and IIRC there was a battle in the area in which the caliphate lost to the Rajputs around this time. The Rajputs losing would not make all of Northern India submit, it would just make the other groups fight harder against the Caliphate.
Quoted for truth -
especially the last part.
What's more, India east of Sind wasn't exactly "just a few Rajput petty states" during the Umayyad and Abbasid periods - roughly between 700 and 1000 AD, much of central India was dominated by the Pratiharas, a Hindu dynasty from Gujarat and one of the three major powers in India during this period (the other two being the Rashtrakutas from southern India and the Buddhist Palas from Bengal).
And the reason that the Arabs never expanded further than Sindh IOTL, is that the Pratiharas and the other Indian powers were simply
far too powerful - the Arabs tried fighting them on a few occasions, but lost pretty much every single time.
...and then there's the fact that the Arabs never even managed to subjugate the Afghan highlands, in spite of many attempts to do so in order to control the trade routes between Central Asia and India.
Most of Afghanistan remained in the hands of the Zunbils, a powerful polytheistic dynasty, along with a few lesser native dynasties. It was not until the rise of the Saffarids during the 9th century that the Muslims got a firm foothold in Afghanistan.