Even if the employer finds that he has respected the rules for laying off, the prud'hommes may well not agree with him, as they are quite biased in favour of the employees. In a sense, the prud'hommes (employment court) can go in and take over part of HR management of a company. For a small business, the risks are too great.
In fact, the rules for hiring and firing are so cumbersome for the employers that many of the large state companies like EDF, La Poste and SNCF circumvent the CDI to a large extent, sometimes by abusively having staff illegally on temp contract after temp contract for years (La Poste condemned), sometimes by making temp contracts without proper justification, sometimes by having crowds of external contractors year after year instead of employing staff (SNCF). These state-run companies don't want to get stuck with too much staff either, and in the case of notably the SNCF, they want to have non-striking personnel to keep the business going in case the civil servants should strike. Contractors don't strike. The SNCF even breaches the contractor contracts as they like. The SNCF runs a hire and fire policy what contractors are concerned as you'd expect to find in the USA. To prevent claims of requalification into employment, they play little games like removing contractor names from the doors, putting "EXT" in from of their names in the e-mail directory, artifically defining limited missions even when it's ongoing work, etc. What they are doing is basically illegal, but they make it difficult to prove that it's illegal.
If such large companies find that the CDI is such a problem, then how are small companies supposed to deal with it?