If you remember, this was Montag's original plan for how to fight back against the society in which he was living. So I think that he does this as he runs away as a way of trying to fight back against the society.
The idea behind Montag's plan was that he wanted to undermine the reputation of the government. He wanted to make people think that there was something wrong with the people who were enforcing the rules. So what better way to do that than to put books in firefighters' houses?
By planting the books there, he could make the firefighters look bad and he could (he hoped) undermine the society a little bit in that way.
In Part Two of Fahrenheit 451, Montag and Faber develop a plan to plant books in the houses of other firemen as a means of weakening the fireman system from the inside. In Part Three, Montag brings this plan to life when he plants a book in the home of his fellow fireman, Black. Planting this book, however, is not just about social action, it is also about Montag's self-preservation: at this point in the story, for example, Montag is on the run after murdering Captain Beatty and fleeing the crime scene. By planting the book at Black's house, Montag hopes to cause some temporary chaos which will not only bring the fireman system into disrepute but will also buy him some extra time to flee the authorities and get out of the city.