When Charles Dickens was a boy he was sent to work in a grotty old blacking factory to help pay off his father's debts. The work was long, hard, and utterly soul-destroying, and marked Dickens for life. However, he was able to turn this traumatic childhood experience into great art by using it as an inspiration for David Copperfield.
David, like young Dickens, is sent out to work. Child labor was depressingly common in those days, with few if any regulations to protect children at work. Like so many other children, David's forced to toil away in unspeakably bad conditions for nothing more than a pittance. What makes things even worse is that he's slaving away in Mr. Murdstone's wine warehouse. David already hated his wicked stepfather to begin with, and has even more reason to hate him now. He can't handle the appalling conditions, not to mention the humiliation of working for a man he so cordially loathes. So it doesn't come as much of a surprise when David runs away from the warehouse to seek sanctuary with Betsey Trotwood.
David Copperfield at this stage of the novel has been sent by his stepfather, Mr. Murdstone, to work in his wine warehouse under terrible conditions. However, he is lodging with the Micawber family, which starts his longstanding relationship with them and their pecuniary difficulties. David finds solace in their friendship, however his feelings of abandonment and loss of status still cause him some misery. Mr. Micawber is put in debtor's prison and after his release the family decides that they are going to move to look for work. David decides at this stage that he will not stay in London without the Micawber family and thus borrows money from Peggoty and flees to cast himself upon his Aunt, Betsy Trotwood.