In the US, there is due process. Granted, that due process has been seriously eroded over the years in cases where the government can claim terrorism, but otherwise, it still takes a court order to force a company to comply with a government request for information.