Plus half a season is a LOT of money! Even if it is unpaid vacation, it's a hit in the pocket book.
I get what you are saying about legality, except pro athletes are essentially movie stars. They are in the entertainment business, and as such they represent a product. You don't want your young star of a franchise to come out flashing the Hitler salute because he's a Neo nazi. That could turn away fans, and the NBA does not want to lose money. The players have freedom of speech, up to a point. When it starts hitting the NBA pocket books, better to knock it off!