Here's why I think Ainge is willing to take the risk (if the price is right):
Look at the list of Dragic's top 3 teams, and consider how likely they are to actually get Dragic in free agency.
Miami simply doesn't have the cap room, and it would take a ton of maneuvering to get it. They could sign-and-trade for Dragic, but that means the C's get something in return.
LA has the cap room to add one major player. Is Dragic their first choice? Second? Third? I don't even think he's their first choice at PG (Rondo is). What if they draft Mudaiy? If they go elsewhere, which is not improbable, that's yet another suitor down for Dragic.
NY is pretty much the same situation as LA, except that they have Calderon taking up a lot of cap space at the PG position too. Does adding a scoring PG next to Carmelo and Calderon (who will otherwise be tough to move) make more sense than pursuing a big like Gasol? At the end of the day, Danny would a) be able to present the biggest offer to Dragic, and b) likely not have to compete with most of Dragic's desired destinations.
There's risk, but there's also reason to believe it is anything but guaranteed that he does walk in free agency. This, also, is why the Suns might be willing to risk keeping Dragic. They know his list of preferred teams, and also know how likely it will be that those teams will actually make a max offer in the summer.