So, games can help shape character goals by their Experience System. Many players are keen on getting their characters to level-up and experience is the achieve that goal. Experience for monsters defeated and treasure won, is encouraging characters to hack and slash their way to glory, at the exclusion of other potential goals.
A different twist on "Monsters Defeated" is to define victory more expansively. This can encourage more thoughtful play. For instance, if rather than killing the entire goblin tribe, we simply convince them to attack a different village, rather than the one we're defending, that might be counted as defeating them for XP award purposes.
Dungeon Crawl Classics encourages much more furtive play, by awarding XP for "Encounters Survived". So even if the party encounters enemies they could beat, it might be worth it for them to come to a non-violent understanding, so as not to deplete their resources.
Similarly, there is the twist on "Treasure Won". Some DMs only award for Treasure Spent. This in-turn, encourages adventures to live large and spend their gold like scoundrels.
Finally there are systems which award XP based on roleplaying. Like giving double awards for a knight who jousts and opponent, or a thief who steals things.
So this raises the question: How should XP be awarded for a Pirate Sandbox game?
My answer: XP is only awarded on a boat!
That's right. Going to explore a dungeon? Combats will only gain you 1/2 XP while you're not on a boat. Similarly, treasure XP will only be counted once you haul it back to your ship.
This should encourage PCs to play as mariners, rather than reverting to a bunch of landlubbers with occasional boat-rides.