Hiring a contractor to build a structure is a partial show of trust. You trust that the contractor knows what he or she is doing. You trust that the job will be done properly. Even if you check up on the contractor, you still assume that he or she is handling any issues that come up in a way that won't jeopardize the structure. Sadly, some contractors don't properly prepare the foundation of the structure. Without a proper foundation, the structure is likely going to have issues.
There are several issues that can creep up when a foundation is being built. The foundation must be laid on properly prepared soil. The foundation must be deep enough and wide enough to support the structure. When the foundation can't support the structure, a host of issues might creep up.
Cracks in walls, settling walls, movement of the building, weakness in the structure and the building collapsing completely are some of the possible effects of a foundation that isn't up to par. Generally, the defects that cause these issues is something that occurs during the construction of the building.
As you can imagine, these issues are sometimes costly to fix. In some cases, they can't be fixed. Any property owner who suspects that a foundation defect is present in a building should have that looked into. If a defect is found, seeking compensation from the contractor so you can remedy the defect is something that you might consider. If the contractor isn't willing to stand behind their work, you might have to take the matter to court.
Source: The Constructor, "Structural Defects of Foundation at Construction Stage," accessed Aug. 14, 2015