If the contract is only in people’s heads, a rename can break a client without anyone noticing. Writing it down in a machine-readable form lets tests check it.