Some kids ask “why” because they understand the question and want to know more, but that isn’t the only reason.
Asking “why” tends to result in people talking to you. Ever hear a kid ask “why” over and over again without caring about the answer? They may have been asking the question because it provides them with attention. It’s a single word that nearly guarantees an adult will talk to you, and sometimes that’s all a kid really wants.