- your boss is influential (politics)
- you are lucky enough to work on a high impact/ high visibility project
- you play yes man with your boss and please them
- how long have you been with the company and the political connections you have made
... quality plays a very small role in promotions ...
In all the organizations I have worked for, I expected a promotion within the first 2 years (to then leave on the 3rd anyway :) ).
When that did not happen, I simply left and got a salary increase and +1 level anyway.
If you are lucky enough to work in a high demand field (like tech) and you are good at it ... you are pretty much in control.
Qualified people that get s*t done are always in high demand, just make sure to always be on the top and keep sharpening your skills ;)