Something similar to this situation is apparently going on right now with the Yankees.
As far as I can tell, the Yankees want to trade Brian McCann but he's under contract through 2018 for $17 million a year, or $34 million total. So, the Yankees are willing to trade him to the Braves and cover half his salary in return for a few decent players from the Braves as well, which would save them $17 million over the course of two years, which is money they can then use to acquire other players.
So, based on this, it would seem the Yankees dumped him as he was an older, slower, and at the time injured and under performing player, thus a liability to the Yankees in terms of the sport as well as on the payroll, sucking up money they could likely use to land a newer, better player.
In real life Justice was first traded to the Mets, who then offloaded him to the Athletics where he spent his final season.
The deal was apparently done to dump as much of his salary as possible onto another team to free up payroll, thus the Yankees literally were paying half his salary for Justice to play against them rather than for them.
Given Justice's attitude in the film, it was Beane's way of letting Justice know he's there by their good graces alone because he fits within the new team building strategy he's using, and because if the Yankees could have just dropped him they would have, but they couldn't and instead sent him to a team that was willing to cover at least half his remaining contract's agreed upon salary. Otherwise if the Yankees had their way, they would have dropped Justice and he'd have nothing.
UPDATE: Per input from LarsTech in the comments, the Yankees could have still dropped Justice if they wanted, but evidently most contracts in baseball are guarantees, so even if they dropped him they would still owe him the remaining $8 million. Therefore, trading him and getting another team to pay at least half of that amount still freed up $4 million for the Yankees to use in signing one or more players to replace Justice, but the point of Beane noting this to Justice, I feel, is accurate albeit with a slightly more malicious intent.