Comment: Re:One question (Score 1) 332
IANAL, but the short answer is basically judges can order whatever they want in theory, although in practice there are significant limitations (more on that below). Another big point to mention is that the United States uses a common law system, meaning that large parts of the law have never been defined by a statute (i.e. a law passed by a legislature). The major limitations:
1. The judicial selection process almost always picks people who are not going to go off the deep end and start issuing crazy orders, but generally stick close to what is authorized by statutory, regulatory, or case law.
2. Orders from lower courts can be appealed and overturned by appellate courts.
3. There are mechanisms in place to impeach judges.
Within the law, there are various factors that limit orders judge are supposed to issue, and I suspect a relevant one here is jurisdiction. Divorce is a matter for state courts, and if the divorce is occurring in a state where Facebook doesn't have enough of a presence to bring it under the judge's jurisdiction, ordering the parties to swap passwords may be a lot simpler (from a legal perspective) compared to whatever they would have to do to bring another action in Federal court or in a state court with jurisdiction over Facebook to compel Facebook to turn over the data. I'm not sure why the court didn't just ask Facebook to turn over the relevant data. Of course it's also possible they did and Facebook refused, or the court knows that Facebook has refused similar requests (as distinguished from orders) in the past.