Well, he said something that damaged (that's an understatement) the league's reputation and potential earnings. Sponsors pulled out, players/coaches/fans were upset, and the NBA got a huge black eye. $2.5M may be light compared to the stain it put on the league.
He's representing a franchise of a billion dollar company. If he harms that with what he says, it's frankly irresponsible for the NBA not to act/stop that bleeding.
He was free to say what he wants, he did, he won't go to jail for it BUT saying what you want does not mean it is immume to a response from others.