Getting into 3rd or not can be extremely sensitive on a too high cable tension
Others mentioned cable tension, and you'd think that is obvious, but I just wanted to highlight that quite small changes in cable tension can make a huge difference.
For example, here's a picture of my Shimano ST-EF65 opened up:
By pushing the thumb lever, I could make the chain go into 3rd. But I could not for the life in me get it to click into 3rd inside the shifter and stay there, and so the shifter would fall back to 2nd.
It had always been a bit hard, but something happened and it became impossible! Here's me trying to do it with my entire hand instead of just the thumb as you would in riding position:
After trying a bunch of things, including spraying WD40 into the shifter to try and remove old lubricant as suggested in many videos, I finally played with the tension a bit further, and only then got it to work.
Once I was in a working state, I noticed that simply turning the barrel adjuster 5 quarter turns already made the difference between being able to shift or not!
The lesson is: the mechanical strengths and precisions of a cable can be really surprising. You'd think that your thumb is really strong and would be able to overcome them with the brute strength of or hands, but that may not be true.