We often hear the question at the Zendo, 'who am I bowing to?' and variations of such as why?, what?, etc.
OK to give some examples of what we are talking about When we enter the Zendo, and move to the zafu to do zazen, we put our hands together under our chins, we use this for saying thank you etc., too. and Sampai is bit more formal making three movements down to the floor and back again representing the relationship between Humanity, Heaven and Earth - the cosmic relationship. That came from Euro-India and is a very ancient pre-Buddhist practice.
OK first Buddhist answer, then Zen answer. You can probably guess one answer is long, the other short.
On one side of things, the bowing is indeed the Buddhist part of Zen, a ritual action, like offering incense or chanting the sutras and dharani. As a ritual action the answer is that it could be interpreted as a practice to generate humility and Compassion or at least bring some humility into training which otherwise might be rather introcentric. A terrible lot of 'me' the saviour of myself, or worse 'me the saviour of the world', would be dominant otherwise. If you ever meet someone who focuses only on meditation and does nothing else one of the things you notice quite often is that they've created skill, they can sit long periods, concentrate etc., but aren't necessarily any nicer or creative for it. So Bowing and ritual complete the practice of Zen to ground us.
That being said, I met someone obsessed with bowing ritual, does little zazen or anything else but obsessed that the world would suffer if they interrupted their daily ritual of bowing 100's of times a day, and feel they are apologizing for all the harm they caused daily. There's also a very famous monk I met from the U.S who did a Bowing pilgrimage right across the continent taking a few steps, bowing, another few steps and so on, took him years to complete it. I think that's really religious, the same as a Catholic doing rosary or a Muslim doing their equivalent, that kind of practice to me isn't even Buddhism. Someone who does that will say 'I'm doing the Bodhisattva way for all beings, expressed in this ritual', well I can go with that a little, but a lot, that's something else. I think that kind of stuff comes rooted from some sort of deep personality attachment, plus a little cult to fertilize it. But does that do any harm? Well one person in the above examples probably was doing a lot of harm to themselves and certainly was a personality type doing a lot of harm to others and as usual with religious people, excusing it everyday with their ritual, which did nothing to appease anyone they'd injured at all! The other might have brought some attention to a cause, but I think if you have that kind of disciplined power, you could be out there getting really rich and successful so you can actually donate some of that wealth etc. You see what I mean? That's where Religion is of questionable use.
So the Zen answer; examine the question, 'who is doing?' Go deep and don't settle for 'Mary Jane the mother or John Doe the father', go for it deeply. Then the question becomes part of zazen, and part of working in the garden, and all the other things you do.
So the Zen answer is a question, as usual, well that lays all sorts of possibilities out for your life.