The main thing Huck steals is Jim. Stealing a slave is serious business, punishable by death, but Huck knows it is obviously morally justified. Jim is only a slave in certain states and a free man in others. Huck pragmatically deals with this relativism by fleeing the slave states in his journey north. Therefore, stealing from an immoral society is moral. It's kind of like a Robinhood "steal from the rich and give to the poor" attitude. Huck's version, of course, is to steal from the slavemaster and give to the abolitionists, although his decision is not based on politics.
Huck knows that the society he is from is immoral. It's a rogues gallery: his father, the murderers on the Walter Scott, the Wilkses, the Duke and the King. He learns how not to act by witnessing the immoral actions of these men. According to Professor Royal, Huck's plans to “steal” from the Wilkses in chapter 26 "is highly ironic, for Huck steals the money in order to learn about the sheer gravity of stealing":
Huck learns moral lesson inversely, learning through the negative actions of the King and Duke
Huck not only learns morality inversely from immoral characters, but he learns it from Romantically idealistic characters, like Tom. Tom's adventures are for escape: they have no moral consequences. Huck's adventures are matters of life and death, and his moral growth is the focus of this picaresque novel: it leads to maturity and self-discovery. So, in the social satire of Huck Finn, stealin' does a body good.
I think that Huck has somewhat of a conflicted or contradictory attitude towards stealing, but it is one that probably makes some sense.
On the one hand, Huck has no problem with the idea of stealing things he needs. He will steal clothes or food without really worrying about it.
On the other hand, he seems to feel that it is wrong to steal money and especially that it is wrong to steal large quantities of money. You can see this in how he keeps trying to keep the duke and king from stealing from people.
This makes some amount of sense -- it makes sense that he should think it is okay to steal things you really need, but not to simply steal out of greed.