This was a science fiction short story I read in the 1970s.
In the future interstellar spaceships are nuclear powered. The nuclear reactor room has thick lead walls to stop the radiation. The passageway into the reactor room has a couple of 90 degree dog-legs in it. The idea is since radiation travels in straight lines, you do not want the passageway to be a straight hole right through the lead shielding, the dog-legs stop the radiation.
Explorers on an alien planet discover some remarkably human-looking aliens with a tribal level culture. One alien is given a tour of the spaceship, and remarks that they put 90 degree dog-legs in the entrance to their huts because harmful demons only travel in straight lines.
Then some of the aliens ask if they can hitch a ride on the spaceship to its next destination. The explorers figure why not?
The punch line is that the tribal aliens are on many planets, because they discovered it was easier to be useful and hitchhike on other's starships compared to making their own starships. The dog-legs on their huts was a memory of their last hitchhiking, a few thousand years ago with some other star-faring species. The story ends with a cute sentence along the lines of "we just have to wait, another ride will be along in a couple of thousand years."
Does this sound familiar?