But until that situation worked itself out, trying to get on a ship and go back to Africa was one of the more plausible options available to them.
Being a fugitive slave was a dangerous proposition, even in the eighteenth century.