The raft is a literal vehicle of freedom in the novel, taking Huck and Jim away from the place where they each felt a need to flee, and it also symbolizes good fortune.
Of all the difficult and unfortunate things that happen to Jim and Huck over the course of their journey, none of the worst things happen on the raft. Even when the raft suffers some damage, it ends up remaining viable and intact. This is the luck that freedom brings to Huck and Jim.
We can see the idea of luck also in the fact that the raft came to them on the island. Huck and Jim were able to acquire the raft (without stealing it) as a sort of gift from nature.
On the raft, Huck reflects on the beauty of nature. On the raft, Huck and Jim share a more-or-less equitable and caring friendship. Off the raft, rapscallions, feuds, captivity and trouble are encountered.
The problems of society at large are encountered off the raft, including the issues that Huck encounters regarding his moral sensibility. On the raft, Huck is free from society's morals, which inform Huck's opinions of his self-worth and form the basis for his perception of his own morality.
[Huck] is representative of the American frontiersman who chooses the unknown over the tyranny of society.