Well, that was during various operational sorties, where different rules to keeping shuttles at hot standby might apply.
We really don't know what is involved in prepping a TOS or TNG era shuttle for flight: usually, our heroes give plenty of lead time to the deck workers to do their unseen magic before they themselves board the craft. Sometimes in TNG, there is smoke involved (for reasons better left unmentioned); perhaps shuttles on occasion need to be filled with cryogenics, or then merely washed? Sometimes we see cables lying about, or tooling (mainly in matte paintings, though, not on sets).
Cases where we can be certain there were no deckhands around to help the immediate preflight preps include "Mudd's Passion" and a few of the VOY shuttle hijack hijinks. But in TOS, we could in theory argue that the villains coerced the shuttles out of the hands of the personnel working on them, by false authority or superior powers or whatnot, as there were no visuals associated with that part of the hijack.
Timo Saloniemi
TNG tech manual refers to various "within X minutes of launch readiness" for various alert statuses, with Red Alert being about 5 minutes. Longest was about 30 minutes for a regular situation. But I'm happy to imagine a lot of that is standard preflight checks that could be skipped in an emergency or if you didn't care. Check out the preflight procedure for light aircraft these days - tyre pressure? It's the sort of thing you're meant to check on your car as well when going on a long trip... But in a modern vehicle the chances of your oil being low etc are minimal.