It's a bit strange to think of a time of being kidnapped, bashed on the head, sent to sea, threatened with banishment as a slave in the Virgina Colony tobacco plantations, seeing a demented ship's cabin boy's life brutally snuffed out, being made a servant to the Captain's table (to replace the boy), and slaying attacking sailors as a learning experience.
But we'll agree for the moment that this is not an offhand and narrow-minded perspective and examine what "learning experience" David may have had. Well, for one thing we know he did not learn to swim or sail while aboard the Covenant. We also know that he did not learn to shanghai and maim people. We know he did not learn to drown himself in drink the way Mr. Shaun did. He did learn to shoot a pistol. He did learn that being the rightful heir of an estate did not mean that he would obtain that estate. He did learn that some sailors could be cutthroats, thieves and murderers. He, a Loyalist Whig, did learn how to get along with an exiled Jacobite Tory soldier.
Then on a philosophical level, David learned that his values and morals and religious beliefs taught to him at his father's knee were not only true and right but that they were so deeply rooted in his mind and heart that even calumny and villainy and treacherousness were not enough to snuff them out (like Ransom was snuffed out) nor to shake their foundations. He learned that these foundations would lead him rightly in his judgments of who was a friend and who was a foe. He also learned that to preserve life and limb, self-defense that contradicts some of the virtuousness taught him is necessary. This is how David's time aboard the Covenant was not and yet was a learning experience.