With respect to government contracts: It would really hurt a company if their detail pricing scheme was released, as a competitor could easily undercut if they had access to that information.
With respect to court documents: It could result is someone getting hurt or a mis-trial due to outside influences (ie. Rob Ford video)
There are obviously many reasons...