According to Exodus 21:20–21, Why did God Permit Slavery?
Thousands of years ago, before the fullness of revelation with the Incarnation of Jesus Christ (Heb. 1:1-4), God dealt with the ancient Israelites where they were, which involved the owning of slaves:
When a man hits his slave, male or female, with a rod and the slave dies under his hand, he shall be punished.
But if the slave remains alive a day or two, he is not to be punished; because the slave is his money (Exod. 20:20-21).
Slaves were regarded as property in ancient Israel, as they were in the surrounding non-Israelite culture. Yet God continually exhorted the Israelites to see the humanity of their slaves, as this prescription shows.