The legality principle, sometimes called the principle of non-retroactivity, holds that you cannot be held criminally or civilly liable for acts that were lawful at the time they were committed. This is a foundational principle of both criminal and civil law in virtually every legal system.
Slavery was lawful under British law until 1833. The slave trade was lawful until 1807. These acts were not merely tolerated. They were regulated, licensed, and in many cases actively encouraged by the state. The Royal African Company held a royal charter. Planters received legal protections for their property in enslaved people. Courts enforced contracts involving enslaved people.
The legality principle means that you cannot now create a financial liability based on conduct that was fully legal at the time. This is not a comfortable position to articulate because it sounds like defending slavery. It is not. It is defending the principle that legal certainty requires that liability be based on the law as it stood at the relevant time, not on moral standards applied retrospectively.