the moral of the poem is, as you sow, so you shall reap. It means that if a person's actions are for the good and the benefit of others, the nature gives that person good things and the person has a happpy and satisfactory life. Just like the abbot of aberbrothok , he tied the inchcape bell for reducing the rate of ship wrecks.
On the other hand, if we are bad and wish for the bad of others, the fate, which the pirate had would be ours.
THIS IS THE LAW OF NATURE
HOPE YOU FOUND THIS USEFUL GLAD TO HELP :)