The best analogy I can use is that of a country invading and occupying another. Subterranean termites live in the subsoil in colonies. .They feed on dead plants and trees. They get their nutrients from cellulose, an organic fiber found in wood and plant matter. Occasionally you would notice earth feeder trails on the surface. They use these earth feeder trails to commute between the colony in the subsoil and timber or structure on the surface.
So the potential homeowner buys a piece of land on which to build his or her most valuable possession and proceeds to dig into the subsoil in order to set the foundation walls. This is where the invasion begins. Keep in mind that the subsoil is the habitat of subterranean termites.
So building continues and on completion the house is a thing of beauty. At this stage the house now built could be regarded as the occupation of the termite's territory .
What the homeowner does not realize is that the house comes with food for the termites. This food found in the timbers is cellulose.
After a while, sometimes it takes years, sometimes months, the termites are sufficiently organized to launch an attack on the occupiers. They operate in covert manner, finding their way in to the building through minute cracks in the concrete or along pipes or conduits in the fabric of the building.
They slowly remove the cellulose from the timber causing it to weaken. By the time the owner realize what is happening, serious timber damage would have taken place. Some homeowners lose their roofs or expensive kitchen cupboards, some may be fortunate only to lose a door frame.
Simply put, the reason why subterranean termites attack your home is because you decided to occupy their home which happens to be in the subsoil.