Quals are essentially how the Front Office rewards their picks before FITREPs. You'll notice people who are on the "fast track" getting more quals earlier and later on advanced quals (IP, FCP, Level 300, etc). Sometimes deployment timelines play a part since you need X qualified people in to go and someone may or may not be a deployment player (timing).
A few factors I saw in HSC:
-Squadron reputation outside the cockpit. Do you take your ground job(s) seriously? Do you play well with the wardroom, and to a lesser extent with the goat locker and bluejackets? Numerous examples here but this is like an "interview" for O-4/DH.
-Fucks given about flying related stuff. Do you have all your prerequisites met and are you in the books early on? Conversely, do you have to be constantly reminded to do shit and show up unprepared?
-Stick skills. Some people just don't have it, although this will usually manifest at the Aircraft Commander qual level. Skipper doesn't trust you behind the boat at night? Sorry, this isn't charity.
-Visibility. Did you spend a ton of time on Det with a weak OIC who doesn't advocate for their people? You might be unknown and have to grind to keep your rep up at homeguard.
As
@Meyerkord mentioned, it kind of happens at the Stan Board. But the Front Office usually has a good idea who they want going into those, although good ones will remain open to suggestions. I'll say as a senior JO running FOPS planning (weeks 1+ to 4) organizing Level 3 dual ship stuff with external entities/ranges/Weapons School, I'd often walk into the CO's office with a plan to push JO A, B, and C on their quals based on seniority-ish and they would look at the qual matrix and make real time changes to JO X and Y. It's subtle.
Ultimately quals are finite and require resources (flight hours, weapons expenditure, ranges, instructors) so they are the CO's investment in you and their belief it will pay off in you staying in the community as a DH and potentially CO.