To be a Pokemon trainer, you need to apply for and receive a Pokemon Trainer's Licence. As only people of 10 years of age or older are allowed to apply, that means anyone below 10 cannot own any Pokemon, as they have no licence.
As for why 10? I don't know, but it was probably decided in a similar way to the real-world drinking age laws (you need to be 18 in my country).
Also, for the second part of your question - what would they do with someone breaking the laws - again, I don't know, but I imagine an arrangement much like the one with Bonnie, Clemont, and Dedenne in the X and Y anime would be worked out. For those who don't watch the anime, Bonnie saw a Dedenne and really wanted it. But since she is too young to have her own Pokemon, Clemont agreed to catch it for her, and hold onto it until she is 10.
Despite supposedly needing to be 10 in the anime, there doesn't seem to be any such restrictions in the games. While you can argue that Youngsters might be 10, you really cannot argue that the Tuber or Preschooler trainer classes can be anywhere near 10 years old.