He would probably be on a fully non-guaranteed contract, so they can cut him at any time if he doesn't behave.
They could use a center. Mahinmi has been mostly terrible this year. Besides, they have no 3rd center at all, and they don't have anyone like Amir either (a PF who can step in and do a solid job at center if necessary).
Low risk, high reward type of move. I'm sure if they see any negativity in the locker room they'll cut ties right away.