This detailed article on the FBI vs Apple legal case had a little side note according to this Bloomberg article.
"Unfortunately, the FBI, without consulting Apple or reviewing its public guidance regarding iOS, changed the iCloud password associated with one of the attacker’s accounts, foreclosing the possibility of the phone initiating an automatic iCloud back-up of its data to a known Wi-Fi network, which could have obviated the need to unlock the phone and thus for the extraordinary order the government now seeks. Had the FBI consulted Apple first, this litigation may not have been necessary."
Just in-case you think Apple is the only good guy around, Microsoft have been battling with the DOJ to stop their request to hand over Irish server emails. An article on that here.