Why do shoulders hurt after climbing?
Firstly, something many people don't actually realize is that the shoulders play a huge role in climbing. Many people think that climbing mainly uses your arms, back, and core, and that all of the other muscles are more like "supporters" for those main muscles.
Shoulders are heavily used in climbing, they are constantly engaged, and just as with other muscles, if you over use your shoulder muscles, they will hurt. If your shoulder muscles are generally weak, they will be more likely to hurt more than other muscles.
On top of that, climbing puts your body and shoulders in positions it may not be used to, causing your shoulders to put in extra effort in keeping your body stabilized and on the wall.
While climbing, our hands are mostly above our heads, or at head-height. This position, in addition to the heavy load they must bear (sometimes your body weight is held largely with the help of your shoulders), can cause a lot of strain on your shoulders, especially in the overhead position which can cause pinching to occur, resulting in painful shoulders.
With time and with better technique and stronger shoulders, the pain felt in the shoulders should lessen. This does of course depend on how well you listen to your body and if you give it the correct amount of rest which it requires. If not, you will likely injure yourself much soon and much worse.
If the pain is serious, and you are having a difficult time with it even when not climbing, you should see a doctor to get it checked. I have had a lot of issues with my shoulders in the past due to previous unrelated injuries, and climbing actually amplified the pain until I started treating it better and resting better. Now, my shoulders have gotten much stronger and I feel almost no pain at all. So listening to your body is crucial.