One further point... this isn't "canon" but it's my preferred explanation for the original TOS Enterprise.
We all know, canonically, that the ship had a crew of ~200 under Pike, but that she had a crew of ~430 under Kirk. How many were aboard at the time of WNMHGB is debatable, though I tend to assume that she still had a crew of 200 at that point.
Here's how I see it. The Enterprise, after the Barrier incident and the emergency field repairs at Delta Vega, limped back to home space, where she was put into a full refit. Her frame wasn't rebuilt but her installed systems were largely replaced. New bridge module, new computers, improved engines and powerplant, etc, etc.
But most significantly, the refit 1701 got the first "replicators." So did eleven other ships out of the much larger starfleet... and these twelve ships were done, and probably relaunched, at the same time.
What would replicators mean to a ship? Well, it would mean that you wouldn't have to carry nearly so much in the way of supplies... no need to carry food supplies, just use the "food slot" replicators to make your meal for you. No need to carry replacement uniforms, or replacement repair parts, or whatever... at least not very much. You'd just need "raw material storage" which could be transformed into whatever you needed... and your waste materials would be reclaimed to serve as raw material for the next batch of replicated stuff.
How much storage space would you free up by doing that? Seems to me that you'd likely open up as much as half of the inhabitable volume of the ship.
So, then - what do you do with a half-empty ship? You don't just put more people on there... not unless those people have a JOB.
Well, I see it like this. Prior to this point, you had the cruisers and frigates and so forth, which were mainly reconnaissance and patrol vessels during peacetime, with almost no science capabilities. You also had a lot of dedicated survey ships.
In this case, they would have simply taken the crew and resources of the survey ships and put them into the now-available extra space. And instead of having a Constitution-class that's essentially a warship, you have a ship that is a HYBRID... a warship with a survey ship inside of her.
Obviously, the 1701 under Pike has a science crew, but it was probably very small. I'm sure that there was no "Marla McGyvers" on board...no more than a dozen total science stafff, I'd say.
But with the "refit for TOS" version, you'd have an engineering and operations crew of ~200 but another full ~200 or so of scientists, and with a detachment of Starfleet Security aboard as well topping off the 430 crew count. All those new crewers would be living and working in spaces that used to be occupied by food lockers and so forth.
Out of that ~200 science types, you'd reasonably have it broken down into planetary sciences (geology, meteorology, etc), life sciences (biologists of various stripes, agriculture and horticulture experts, etc), physicists, astronomery/stellar cartography types, some pure math types, etc. And also a number of "soft science" types... an expanded linguistics team to fall under communications, of course, but you'd need sociologists, anthropologists, historians, protocol types, etc. You'd burn through that ~200 "survey vessel crew" roles pretty quickly, with maybe between three and twelve people in any specific field.
The thing is, and this is why I raised the point... I always got the impression that these "twelve starships" which were sent on this mission to explore beyond the borders of known space were not not "typical." They were the first attempt at the "explorer" that was carried to its extreme in the Galaxy design.
Most ships, I'd think, would have much more limited scientific resources aboard.
Anyway, that's my personal take on it... your mileage may vary.