It's no secret the Pels want to trade BI. They also desperately need a center. While Collins is definitely flawed, he is a least a big body that can space the floor next to Zion. Plus they get Johnson and a 1st.
For the Spurs, they get off Collins and get a star without having to give up much at all. This allows them to play the season out and not worry about BI leaving after one year since they didn't give up much.