Danzou was trying to kill Sasuke. Madara was trying to win Sasuke over.
What's the connection?