Historically, in Europe, the law made a distinction between personal (often ecclesiastical) laws and the legal codes of the territory as a whole.
In India before colonization, however, Hindus and Muslims—with very few exceptions—were governed by their own respective laws.
Colonization in India happened in a complex and geographically varied manner.
Different parts of the country came under colonial control under different legal arrangements.
British laws were introduced gradually and selectively and “personal matters” were to remain governed by the religious laws of these communities.