The cost for operating an NBA team is more fixed than a baseball team. Thus, it's a safer investment as you're better able to predict your revenue each and every year.
In baseball, since there is no salary cap, you have no idea what the operating cost will be from year to year since it can change so frequently depending on the market.
In short, owning an NBA team is akin to owning a house on a 30-year fixed mortgage, while owning an MLB team is like owning a condo on a fluctuating interest rate mortgage along with high association fees.
Also, I'd think an indoor arena is better suited to earn additional money outside of just what the sports team generates. Concerts and other attractions can add to the profitability of a arena owner vs. what an outdoor baseball stadium owner could generate outside of just baseball.