It provides additional legal protection to the employer in the case they decide to terminate the employee during the first X days. Additionally, it serves as a "motivator" for new employees to be on their best behavior and to give it their all, at least for the first x days.
Laws that benefit the company, such as "right to work", mean that employers will often win lawsuits from former employees for things like wrongful termination suits, however companies would prefer to not be sued at all- even if they have a strong case. Court is expensive and a hassle.
That said, I did some moonlighting work for an employment law firm, and they say that they take less than 5% of the prospective clients who contact them, because they (and most law firms who only get paid if the client wins) want to be as sure as possible they will win the case. Of course if the prospective client were willing to pay up-front regardless of the case outcome, I'm sure most law firms would oblige. In such cases, I expect the former employers like to settle out of court to save time and money, even if the odds are good that they'd win in court.