Of the roads to promotion, taking a standardized test with the resulting paperwork, reviewboard, commanding officer scrutiny, etc., whatever is needed, is an established pathway. Achieving great things in the field isn't as quantifiable as a standardized test.
Think of it as the difference between completing school by moving through the grades and acquiring an equivalency certificate, loosely (not a perfect analogy)
The thing is, in order to hold the post of 2nd officer, Data would surely have already taken that same test. They're calling it the "bridge officers test". It might even be a prerequisite for every rank, down to lowly Ensigns. They too are in fact officers on the bridge, who may find themselves the only ranking person left alive there, among other ensigns. Worf would have done it, Yar, Laforge, Maybe even acting ensign Wesley. (Who even got put in charge of a team of higher ranking officers, at one point)
I have to assume it's a fundamental qualification, in order to be up there at all, and until then, Troi was really just a visitor to the bridge, there at Picard's preference, & that's iffy on his part IMHO, not too dissimilarly from him having Wes up there, before he was an acting ensign.
As fun as
Disaster was, it
really did a lot to undercut Troi's qualifications. Until then, I'd have never even guessed she was so underqualified to be up there. Don't even know the emergency protocols? That seems like very rudimental stuff, that you shouldn't even have access to that area, without knowing. The new ensign & the noncom even know that stuff (granted, they both have experience beyond their ranks)
They really botched Troi the most IMHO, even worse than Riker's will he/won't he become a captain stuff. It really made her look like a tourist up there, after years of being there, & that bridge officers test was a Hail Mary pass, that tried to course correct her without too much kerfuffle, after the fact, but even that came off janky imho, especially when now it seems like Data answers to her, in some nondescript, outranked way... which is ridiculous. (Glad that never came up again)