Even though Hagrid was loyal to Dumbledore, it wouldn’t hurt to take Hagrid away from the old fool, so that he would lose his image as the kind grandfather that he was known for. Apart from that, Lucius wanted also to make sure that Hagrid would distrust Dumbledore.