To answer this question, it is first important to understand what sharecropping is. In the aftermath of the Civil War, freed slaves were promised some land and a mule so that they could earn a living. General Sherman even gave this to some of them. However, President Andrew Johnson instead gave all the land back to white Southern landowners. Since slavery was no longer an option, white landowners enacted laws and policies designed to continue to oppress freed African Americans. Under the sharecropping system, Black people (and some poor whites as well) rented land from wealthy white people in exchange for a yearly share of crops. Since they also usually had to rent tools and other necessities, the freed Black people generally remained in a state of servitude and debt.
When we view the story "The Man Who Was Almost a Man" by Richard Wright in this context, we understand Dave's frustration and desire for respect. He and his father work land owned by white people, and his family lives in a state of poverty. Dave sees gun ownership as a means of demanding the respect that he feels he deserves. He thinks that nobody will demean him if they know that he owns a gun. He is naïve, of course, in imagining this, but he sees no other way to assert his maturity and manliness. The sharecropping labor that he does is demeaning, and it only puts him further into debt and degradation. In his imagination, owning a gun is his only way out.
We see the attitude of the white landowner, Jim Hawkins, when he arbitrarily sets the price of the mule that Dave has accidentally shot. Nobody argues about the price; it is his right to set it, and it puts Dave in his debt for over two years. It is difficult to comprehend the helplessness and desperation that Dave must have felt. That's why he decides to run away rather than continue to submit to Hawkins. We can only hope that the train is taking him north to a place where he can make a living at something other than sharecropping.