Presently, judges all across the country can make up any legislation they want and force elected officials to like it.
I'm just pointing out that some of this stuff sticks in my craw. Judges think they are legislators and now they think they are Mommy and Daddy. What they really are is a bunch of oligarchs.
Do you know anything about conditions of probation?
I think it's pretty silly to order a 17 year old girl not to have sex, but this sort of thing happens all the time. I've represented hundreds of juveniles in these types of proceedings and this type of ruling doesn't surprise me a bit. The girl is a minor and she is under the jurisdiction of the court. She's probably gotten in a lot of trouble and the judge is trying to put her on the right path. Her parents may be worthless, or they may have actually asked for such a ruling. This is not "legislating" from the bench or making up laws. The judge has discretion to make such orders as necessary when he or she believes they are in the best interest of the child. Whether ordering a kid not to have sex would be found unconstitutional, I don't know. I doubt it, not under these circumstances.