Sorry man, I work in the brewing industry. Kegs are the property of the brewery, not the distributor. The distributor has no right to give the kegs away. The brewery charges the distributor a deposit, that deposit gets passed down to the retail customer. Aluminum is expensive, and lost/stolen kegs are a huge expense to a brewery. If a keg is no longer serviceable, the brewery scraps it to help recover the cost of buying a new keg to keep the pipeline full of serviceable kegs.
My original comment wasn't to chastise or turn anyone in. Using kegs for home brew brewing equipment is a well established process, which I do not condemn (I even said I was jealous of the OP's setup). I was merely commenting on the irony of the technicality of selling stolen property. Your buddies distributor was merely willing to eat the cost/risk of giving away kegs. Doesn't make it "right", it just is what it is.