The point is that the legality of the court order compelling Apple does not depend on whether or not the FBI made a mistake in other investigative approaches. If the order is illegal, then it doesn't matter whether the FBI needs the access it provides or not, it's still illegal. On the other hand, if the order is legal, then the FBI needing it due to a mistake doesn't suddenly make the order illegal.
Their mistake shouldn't confer access through arguably illegal means (the legality of the court order compelling Apple not yet being settled).