Why the wild Brock Osweiler trade is perfectly legal

Why the wild Brock Osweiler trade is perfectly legal
Source: ESPN.com