They are just good detectives. Ants like wet wood because it is soft and easy to chew. Sills, structural underpinnings, and areas around plumbing are likely infestation sites. Inspectors look for things like wood dust or ant bodies trapped in spider webs to help them identify a potential ant trail. Some inspectors chum the water with a can of cheap cat food.
Ants find the source of protein and a traffic pattern develops giving away the location of the nest.
Be leery of a contractor that does not ask you a lot of questions about ant activity. Here are some common-sense rules to control termites and carpenter ants. Determine the cause of infestations. Remove wet or decayed structural elements. Remove wood that is in contact with soil.