The relatively small amount of heavy cruiser and explorer ships venture outside of Federation territory, but the vast majority of ships, your smaller patrol vessels, cargo transports, medical ships, mining ships, construction ships, colony ships, passenger liners, comms relay ships, etc. rarely venture out of the safety of Federation claimed space or known and pacified shipping lanes without invitation or protection from a planetary government.And they said that Federation ships rarely leave Federation space literally ten seconds before the opening credits says the mission was to boldly go where no one has gone before. Did the writers forget Federation ships going outside Federation space was the premise of the entire franchise?!
For a small and poorly armed Federation vessel to be wandering in unclaimed space alone would be unusual.