Judges orders are often written by the attorney(s) for the party wishing the order to be made, then the judge signs it.
Or, the judge can order one party to write up the order as he/she (the judge) instructed him/her to do, and if the order complies with the judges request, it is then signed by the judge.
If this was requested without the knowledge of the other party, there are numerous violations of the code of judicial conduct as well as obstruction of justice.
That is true. This should be done with knowledge (service) of all interested parties.