German law allows non-compete agreements but puts some serious restrictions on them. They are limited to a maximum of two years, can be expensive for the former employer because the former employer is required to pay compensation to the former employer while the non-compete agreement is in place. These compensations can often be between 50-100% of the former salary and do not get the former employer anything other than the non-compete. And these non-compete clauses can be hard to add to existing contracts. So it is not unlikely that non-compete clauses wouldn't apply to all the German engineers that were part of Grohman engineering when Tesla purchased them.