It’d actually be quite hard to bury the sort of treasure that pirates were after. The idea of pirates hunting for gold and jewels is bit of a myth, as it would just weigh down the ship.
Late at night Jim slips away and rows out to the Hispaniola. He captures the ship - having killed one of the pirates on board - and hides it in a secluded bay. The song is full of surfing sounds.