What do you mean, how is it legal? The players sign the deal. They are forcing this on people against their will. If they were, they could play for another team that wouldn’t and, if no other team will sign them, then that means the market value for them involves opt outs.