Apples and Oranges.
The NBA gets higher ratings than the MLB. I'm not too familiar with the aspects of the business side of MLB, but my guess would be that having 50,000 seat stadiums, and playing 81 home games/season would produce more revenue than playing at a 17,000 seat arena for 41 nights a year. I'm not sure about the TV contracts of each respective league. I will have to look into that.
All I know is that a study was done just after the Expos left for Washington. It was found that MLB really had nowhere else to go, as it had maximized all sources of revenue, and with franchise values for MLB teams higher at the time, the original plan was to contract Montreal and Milwaukee, since there was literally no interest from other markets wanting to move the clubs. Compare that to the NBA and NHL, where there were always potential markets to turn to after a franchise was willing to relocate.