With a good bench press setup – upper back tight and shoulder blades creating a stable base to press from – your shoulders will internally rotate when the bar reaches the chest.
Lack of internal rotation in the shoulders, or upper body mobility in general, can be the reason for painful pressing. Working to increase internal rotation is one solution. Another solution is to work with and around the limitation by adjusting the grip/barbell type. The neutral grip bar allows more external rotation and will "open up" the shoulders.