Why did Tsunade even care?

Why did Tsunade care about Jiraiya suddenly after he died? She was a jerk to him the whole time he was alive. If she truly cared about him why did she treat him like trash?