Sauls perspective of David being summoned to court was to play the harp to releive him of the tormenting evil spirit. But then Saul begins to like David and keeps him as a officer who carries armor.
Gods perspective for the reason for David to be there could be many different things, to learn from Saul, to see first hand how much responsabilities there are for the King, to be a servant so he will know what it is like to serve and how to treat people who will serve him in the future when he becomes King.
Things that prevent me from learning from God is stubborness,
To be more teachable I need to rid myself of self and open my mind to His teachings