Psalm 115:3 But our God is in the heavens: He hath done whatsoever he hath pleased.
That is not an indication that He is arbitrary or just doing what He wants. He does based on His character, who He is. We know much about Him as He has chosen to reveal in His Word.
The verse here that He does what pleases Him is in reference to the contrast with idols. Idols are at the mercy of their owners and makers. Idols must be moved and taken care of. Idols must be cleaned and protected.
God is not at all like that. He is God. We do not decide for Him. He decides for us! He is God and He doesn’t depend on us. We depend on Him.
he does what pleases Him because He is really God and not some dumb, inanimate idol that a man made. He is God!