The NBA was against legalized sports betting until Silver took over:
"For years, former National Basketball Association Commissioner David Stern believed being associated with gambling would hurt the integrity of professional sports.He even testified on behalf of NBA star-turned-senator Bill Bradley’s Professional and Amateur Sports Protection Act (PASPA), which became law in 1992 and prevented sports wagering from expanding beyond four states that already had some version of it, including Nevada, the only state with legal race and sports books."
After he left the NBA he changed his mind but I believe all of the other sports have campaigned against it for many years
True, although Stern - with Silver prodding him - was changing his view in his last few years. For example:
" In 2009, then-commissioner Stern told
Sports Illustrated, when asked if legal sports betting would be in the NBA's best interest, "It has been a matter of league policy to answer that question no. But I think that league policy was formulated at a time when gambling was far less widespread -- even legally."
A couple of years prior to Stern's quote, Deputy Commissioner Silver said: ""As we began to stage exhibition games in Europe and China and jurisdictions where sports betting was legal, it caused me to focus more on this than I had historically. Then we began getting approached by sports-betting companies outside of the United States, where it's legal, to do business with them. As we became more of a global company, I began to think about what our policy should be here.""