In Chapter L of Great Expectations, Herbert tends to Pip's burn wounds and relates to Pip his rather intimate conversation with Provis (Magwitch). In the course of this conversation, Herbert tells Pip that Provis had a wife who strangled another woman; after this happened, she came to Provis and "swore that she would destroy the child" and vanished.
A few years later when, as a convict, Magwitch ran into Pip on the marsh, the seven-year-old Pip recalls for him the child he has lost. Herbert tells Pip,
"...you brought into his mind the little girl so tragically lost, who would have been your age."
In addition to this reminder of his little girl, Magwitch has desired to become the benefactor of Pip because he remains grateful to the boy who has showed him some kindness in his tragic life. And, by being Pip's benefactor, Magwitch has had a reason for working, someone he can love--someone whose life he can make better than his. In doing so, Magwitch himself feels he can be raised from the level of a mere convict.
The reason for Magwitch's attachment to Pip whom he met in the churchyard is that Pip reminded him of the little girl whom he lost many years ago, who would have been of Pip' s age by now. According to Pip the Provis down-river is Estella's father.