Answer:
Huck's morality is doubtful and not always correct, but that is what makes him act in a necessary way to ensure his survival.
Explanation:
Huck is a complex and often controversial character. He is not a hero, an admirable character all the time, because his morality presents divergences and he often does wrong things, but necessary to keep him alive.
Huck abandons prejudiced concepts, does not care about race issues, has no desire to please humanity, steals when he needs it, without showing any remorse, but shows compassion for human life and fidelity to friends. This allows Huck to act as needed, staying alive and active at any time.