You don't work with children, do you?
What makes you think that?
In a classroom, every single child in the room will have ample opportunity to do this sort of thing several times over during the day because it is simply impossible for one person (two if you're lucky enough to have a Teaching Assistant) to actively supervise every single child at all times.
I agree that children have ample opportunity to misbehave or get into mischief at school
The reason children at school behave themselves is because they learn and understand the rules and consequences.
First of all "the majority" (by no means all) of children behave at school because they are actively engaged in other things and are, for the most part, supervised or at least have one or more adult in the room. An adult presence, even if not actively supervising, is usually enough to stop most children doing anything too awful. And secondly, lots of children behave badly at home, or get into mischief, precisely because they do have periods of time without an adult presence, which gives them far more scope to egg each other on into trouble. I didn't say they have to be watched every second but a level of supervision is required especially when you don't know the child that you have invited round very well.
Those that don't have the in school equivalent of having their play date cut short (e.g. sent to HT/miss breaktime).
I agreed that the op did the right thing by cutting the play date short and explaining exactly why to both parent and child. However, that does not mean it won't happen again, even if it's a different child who comes over. Children are impulsive, unpredictable and curious and there is so much scope for mischief, trouble, accidents. You cannot really police it all the time but by being realistic with expectations, giving clear instructions and not expecting a 6 yr old to be able to read and take charge of a situation, you can be more aware.
And, just for the record, I have worked with children for 40 yrs, mostly under the age of 10. In a variety of settings, hospitals, primary schools, private homes, children's homes, private nurseries, social services nurseries and in my own home. All children are different, and yet they are all the same. The children 40yrs ago got into the same scrapes and mischief as children do today. You simply cannot say "all 5/6 yr olds wouldn't. [whatever] ....." because some will, and always have.