Training within an airline is a cost, with a bond, maybe, but a cost.
But these programs are not a cost. They are a bussiness, where those who buy "the product" are the pilots.
It is simply perverse, and I am convinced that it is not legal, though it seems to be.