At least initially, Starfleet was very clearly conceived as a Space Navy and the original Enterprise
as the equivalent of an American missile cruiser, with a dash of old-timey Royal Navy adventure thrown in for good measure*. The writer's bible for the original series made this very clear, and AFAICT the shows bear it out.
(* In some ways the Enterpise
is actually reminiscent of a ship like the H.M.S. Beagle --
whose famous surveying voyage with Charles Darwin aboard was, incidentally, five years long --with a combined mission of surveying, naturalism and chipping in to put down the occasional revolt at ports of call. The inspiration for the command officers perpetually beaming down to planets was almost certainly the practices of the Royal Navy, where the captain and ship's surgeon often had to go landside to direct efforts, meet with dignitaries, carry out research and so on.)