It sounds like you are describing a test called the relocation test. This is a test of shoulder instability. When positive, the first position (arm out to the side, palm up) causes the patient extreme anxiety or fear that the arm is going to dislocate again.
Downward pressure against the head of the humerus in this position prevents partial dislocation called subluxation or full dislocation. This test actually stabilizes the joint. It feels better because the humeral head is pushed back into the socket.
The doctor uses this test along with several others to tell 1) is the joint stable and 2) if not, how loose or unstable is it? Sometimes patients have pain with this test but no apprehension. That is not as diagnostic as the patient who has apprehension and pain at the same time.