First of all students go to school to learn something. If they want to neck or engage in Sex that is fine, but have the decency to rent a hotel room, park a car, or go to one of their houses. There is no need for Sex in school. It is a matter of self respect and courtesy to others.
If you have a large high school with over 500 students all trying to get to class, who wants to have to try to get around teenagers doing their thing in the middle of the hallway? It is counter productive. Certain activities are better left in the bedroom.
Another point is that when the students are at school, the school is responsible for their actions. Schools have become a kind of guardian to the students. Schools have a responsibility to answer to the parents and protect themselves against law suits.
In my day they use to send boys home because they had not shaved and there was a dress code for girls and boys to follow. Even kissing would not have been allowed in the halls, because it always leads to something more. Of course there were always those who would kiss and hold hands and get twitterpated.