Why did it take so long to ground those Boeing planes?

Why did it take so long to ground those Boeing planes?