There's a theory that dowsers can identify 'leylines' because these are paths that were in use for thousands of years. That s thousands of years of the soil being compacted, and also possibly quite a long time over which metal from hobnail boots couldve worn off. Thatd cause some change in the local magnetic field.
I never managed to dowse successfully, cause the wind causes havoc. (But Ill keep trying, Morfe!)