Slaves are capital, and, like all capital, acquiring and maintaining them has nonzero cost.
In the antebellum American South, some tasks like ditch-digging were sufficiently hazardous that a plantation owner would rather not risk their investment in their slaves, and so would hire Irish ditch-diggers by the day, as the plantation owner would be out less money if they died while digging the ditch.