Moral obligations: Dumbledore couldn't turn a blind eye to Grindelwald's dangerous and damaging methods, which included violence and manipulation, and the threat they posed to the entire magical community.
Personal ties: Dumbledore had a deep understanding of Grindelwald's past, motivations, and true nature, which made it impossible for him to stand aside while his former friend caused devastation.
Protecting Hogwarts and the greater wizarding society: Grindelwald's goals posed an immediate threat to Hogwarts and the magical community at large, demanding that Dumbledore take action.