I am Japanese and bowing is a kind of second nature for me. We say お辞儀(おじぎ)Ojigi in Japanese.
To bow means to show respect to others. Is is said that showing the back of your head means that I have no intention to hrut or harm you because that part is the weakest among our body parts. While I bow, I am not able to hurt you. While I bow, you can hurt or attak me. To bow shows trust in you.
As we Japanese are taught to bow since we are very young. The yougest, even infant who can’t speak a word are taught to bow instesd of saying “Thank you.” Though nowadyas it may be changing, it is still taught by grandparents and older generation.
In nursery school, in the morning we say “Good morning!'” to teachers with bow. Between classes teachers and children bow each other at the beginning and the end of the class. When they leave nursery school, they say “Goodbye.” to each other. Both teaches and students bow. Then kindregarden, elementary, middle school, high school. There are a few exceptions in private school.
Wherever you learn something form a teacher, you and a teacher bow. To bow shows respect each other. It’s manner to bow and it’s so natural and a prat of habit without thinking why I am bowing. I haven’t though how we start bowing until I learned manners.
Another thing I shoud mention about bowing is degree, how deep you bow. The deeper you bow, the more respect you show. Apology, gratidude, formality and respect can be measured. Also the speed too. If you bow very quickly, it’s too casual and maybe misunderstood you. In business scene it’s very important to bow when you meet for the first time, express gratitude and apology.