Was East India Company really independent from the government? Wikipedia says [1] in 18th century the government effectively had control over those territories.
I think the idea was to allow private investors to colonize new territories and later seize control from them.
The fact that nominally WIC "had" the army doesn't necessarily meant that in the case of conflicting orders it would obey WIC, as the Indian armies were run by British officers who also had sworn loyalty to the King/Queen.
Just one example that never seizes to amaze me:
By 1803, at the height of its rule in India, the British East India company had a private army of about 260,000—twice the size of the British Army.
https://en.wikipedia.org/wiki/East_India_Company