The Account Core Model must be created before the legal company.
The field account core model is used to asoociate the company with an account core model defining the chart of accounts attached to the company (the bookkeeping currences, analytical dimensions, etc.).