It was not a temporary alliance. Hindus & Muslims again joined hands to oppose Bengal province partition by British in 1905 and made them reverse the action. They again aligned to oppose British during Khilafat movement.In the same sense as moosad and ISI cooperated to defeat USSR in Afghanistan.
1857 was a reactionary, temporary and unorganized conflict with Britishers.nothing more.
Subhash Chandra Bose's Azad Hind Fauj had both Hindu and Muslim senior officers.
Most of the major conflicts in this world happened between co-religionists. World war 1 & 2 involved mostly Christian states. Cold war was between Christian US and Christian Russia.The reality is that Religion is the most influential thing in this world.people can do literally every thing to save interests of their religion.Ham ne tu Sirf aik country banaea hai
North & South Korea conflict or North & South Vietnam conflict had no religious basis.
Gulf states fight each other although belonging to same religion.
Mughals fought Delhi Sultanate although both were Muslims.