Well, that's not what you said when you were making your sarcastic little comment about surgery, but okay. The chief engineer left the ship. Keenser, presumably the second most senior engineer, left the ship. Their previous chief engineer, Olsen, was killed during the first movie. Half the cadet corps got blown to smithereens above Vulcan. A bunch of other qualified officers are engaged in conflicts in the Laurentian System and against the Klingons. Cadet McCoy became the CMO after their normal doctor was killed above Vulcan. Kirk got promoted to XO under Spock when Pike left the ship. What part of them being really shorthanded and in dire straights did you not catch on to? It was a spur of the moment emergency mission where they didn't have time to deal with red tape and recruiting someone new and unfamiliar with the ship, so in a pinch the genius who had already demonstrated an aptitude for multiple specialties around the ship and who trained under the chief engineer temporarily got the job. Given what we've seen with Wesley Crusher boy engineering and navigation genius, Geordi moving from Conn to Chief Engineer, B'Lanna bypassing the more experienced Carey, and Nog's apprenticeship under Chief O'Brien helping him rapidly rise through the ranks and positions once he joined Starfleet, it doesn't seem all that unusual in Trekdom.