If you defeat the dragon, then you win! You claim the dragon’s treasure and presumably spend the rest of your life as a fabulously wealthy pirate king, while your opponents wallow in obscurity and poverty forever. Losing to the dragon means you discard your crew and all of your upgrades, but you keep the cards in your hand and can start rebuilding on your next turn. The good news here is that, like the scurvy dog you are, the captain doesn’t go down with the ship.