The reason for bowing in karate class is Respect. You bow when you come into karate class and leave karate class.
You bow to your opponent before sparring because you respect them.
You should bow from the waist and keep your neck straight, bow not too low, but not a nod of the head either, somewhere in between. The first bow you do when you sit on the ground is to the “Shinzen” in respect to the art of karate. The second bow is to the sensei, to acknowledge them for teaching your style of karate, and the third bow (if there is one) is to your fellow karate students.
The sequence to bowing is lower belt first and then the higher belt bows, as in, if you were a yellow belt, and you had to bow to a higher belt, you would bow first. When you bow, look like you mean it. That way, if you mean it when you respect someone they will know and respect you too.
When you should definitely bow is when someone bows to you.
So when you bow, you should not be thinking about that new toy you want to buy, you have to focus.
The bow is a sign of respect. Respect for your sensei, each other, and all those who came before you and made your art what it is. But notice the sensei is bowing back. Respect is a two-way street, and the best sensei realize that.
It is also a greeting, very common in asian countries, where most of our arts originated.
Now you know!