Cats are not like dogs (which is probably not news to most people). A settled group of cats will recognise one another and bond socially, but they do not roam around together like a wolf-pack. Individual cats will leave the group's resting area to hunt singly, and, if something traumatic (like noisy fireworks) makes the group scatter and run they will re-group by returning to their familiar area. They get to know where there are safe hiding places and will run for them in case of danger.
By initially confining a new cat in one room, until confidently eating, using a litter tray etc., then allowing her to explore the house, and only letting her outdoors after several weeks have elapsed, you are establishing that your home is the safe core area where your group lives. This means your cat's instinctive reaction will be to attempt to flee indoors if anything outside startles her. If something prevents her from entering the house, her instinct will be to hide reasonably close at hand, rather than running away. Once the house is accepted as home, a normal adult cat will cautiously explore the surrounding area and won't get lost. A cat who is released before the house is seen as home, will tend to wander seeking familiar surroundings and will get lost (or return to their previous home).
This is why "indoor only" cats who accidentally get out can usually be retrieved without too much trouble (because they hide close by) and why cats who escape during holidays or trips to the vet really are lost.