Moisture is the main issue
Tree roots seek water. Where a large tree draws substantial moisture from one side of a house, nearby clay soil can dry and shrink more than soil elsewhere.
Distance and species matter
The potential influence depends on tree size, species, distance from the structure, irrigation, soil, rainfall, and root conditions. A tree close to a house is not automatically a foundation problem.
Do not remove trees blindly
Removing a mature tree can change soil moisture again and can create other property concerns. Tree work should be based on site-specific evidence, not a generic foundation rule.