A contract is simply an agreement between 2 parties that is backed by law. For instance if one company has a contract to supply another company with X amount of merchandise both companies have to play by the rules set forth in that agreement.
It is basically so one company doesn’t back down last minute or try to change the rules.