Basically, they take a lot of lawyer time to negotiate, in order to make them as close to airtight as possible. And if anything goes wrong, it takes a lot of lawyer time to resolve them. And lawyer time equals money (as much as $2k/hr, billed in 6 minute-increments). So you could pay six figures negotiating an earnout, and another six figures when things don't go as planned. That doesn't mean they're always a bad idea — just the vast majority of the time.
A candid lawyer will counsel you away from an earnout, and if a lawyer doesn't mention the potential downsides of earnouts, I'd consider that a big red flag.