Very simple. Officially, the title for children under 15 years old is dek chai (boy) and dek ying (girl). They become "adults" at 15 and then the titles change to nai for men and nangsao for unmarried women.
Up until around 2010 Thai citizens had to get the ID card at age 15. Yinglak had changed the rules first to allow (and encourage) children get their ID card at age 6, and I think now it is required by law to get the ID at that young age, and that's why you have the master title (and I guess they use miss for young girls instead of the ms. for adults.