Counterintuitively, systems with heavier employment protections can make it more common to cut recent hires.
Employment protections usually come with a probationary period before they kick in, so employers can remove bad hires early. This creates an incentive to remove new hires before their probationary period is up if they're showing any signs they might not be the best candidate for the job.
Even when new hires are good and the company wants to keep them, heavy employment protections favor longer term employees. If the business environment changes and they need to reduce headcount their hands may be tied in ways that require cutting the new hires before the tenured employees. This happens a lot in labor unions, too, where tenured employees have greater standing than new hires when push comes to shove and someone needs to go, regardless of performance.
In Germany we have pretty good employment protections (I think at least!), but this would be legal too. You have a 3 month grace period where the employer can terminate the contract without giving much reason - you gotta survive this period then the protections kick in and they can’t just terminate the contract without a justification and notice period.
It sucks but I think in this case even the best protections won’t help much.