Foundation has a limit - the cost to raise the house as if moving, removing the whole foundation, and building a new one.
Other structural issues can be much worse (mold is one, but think cross beams that miss the load beam).