I think mothers usually spend more time with their kids than other people, even if the kids are in childcare all day. Also, mothers are usually the primary caregiver in the sense of being the one responsible for managing the childcare, interacting with doctors, teachers etc. So the teacher may see different behavior when the child is at school, but the teacher isn't privy to the child's medical history or details of the family history. The doctor knows the child's medical history but does not know how they are getting on at school because he/she is not interacting in detail with the child's teachers. The mother is usually the person who is being given (and who is mentally collating) all the disparate information from all the people who are providing different aspects of the child's care.
In addition, a big one (I think) is that when the child is sick, it's usually the mother who is caring for him/her. When the child is sick, they get sent home from school so the teacher is not observing their sick behavior. If they see the doctor, he/she will only observe their behavior long enough to make a diagnosis and treat, but will not be around to observe all the other things the child does when sick.
So from all that viewpoint, I think the mother is getting the most complete information.
How mothers use that information is variable. Some mothers are good at using the information and others selectively ignore information they don't want to hear. But I think in most cases (unless the father is the primary caregiver in the family) it's the mother who is the ultimate destination of information about the child. For that reason, although it's fine for in-laws to give input, I think they need to do it with the understanding that the mother will take it under advisement and that the mother does not have an obligation to obey the in-law/ neighbor/ best friend,/random lady on the train who thinks the mother is clearly wrong based on 2 minutes of observation. I know some commenters are saying there are areas where they have seen a mother do something clearly wrong, but sometimes the mother's action is being motivated by specific information not known to an outsider. (That could even be medical information. Recall that if you aren't one of the parents then the parents have no obligation to communicate their child's private medical information to you.)
But I wouldn't say that a mother "knows the child best." I think that comes with unspoken connotations that a mother knows her child better than the child him/herself. That can be used, even by well-meaning, kind mothers, and even unintentionally, to limit the child's potential by essentially creating a self-image that the child cannot (is not allowed to, or is incapable of) step outside the box of the mother's image of that child. When a child is little then a mother has to use her information to fill in the blanks of what the child cannot communicate. But as the child gets older I think it's important for mothers to step back a bit and explicitly acknowledge to the child that they are their own person and get to decide the boundaries of their own potential.