David is far safer remaining in the vicinity of Saul by the will of God, than ever he would be finding his own refuge far away from his enemy. The Lord has told him through the prophet Gad to return to Judah (1 Samuel 22:5).
How good it is when brethren can truly rejoice in the blessings of their friends without any envy or rancour. Love removes all competitive ambition, and finds as much pleasure in the advance of others as in our own advance. Ultimately the believe is motivated by desire for the glory of Christ, and in so doing loses sight of his own glory (Revelation 4:10). Godliness with contentment is great gain.