In smaller companies where your work is very visible, your work will matter more. But I have seen plenty of examples where nepotism or favoritism got less qualified people in key roles while highly productive developers got stuck as low level ICs. Some developers don’t play career games and they want to stay ICs which is understandable. But I have never seen the best developer being promoted to key roles without them focusing on office politics, boosting about their work, and starting pet projects to help with promotion packet.
Industry needs to give an illusion of meritocracy in order to extract maximum productivity from fresh recruits. Otherwise, everyone would spent their playing politics game and no work will ever be done.