When you shave you follow a ritual as well
There is a distinct difference between a "ritual" and a practice or task of repetition. Shaving is the practice of removing facial hair and is no more a ritual than farting, though I'm sure someone will try to say how farting is a ritual in some culture somewhere. Any task or practice can be incorporated into a ritual. It doesn't make that task a ritual in and of itself. Bowing isn't a ritual, bowing to an inanimate object out of respect for the ancestors and the holiness of the room you practice in is .

I will easily bow respectfully to my friends in Tokyo. I won't prostrate myself before them and I won't bow to a room or to a flag.

Bottom line is the traditions and rituals in martial arts have religious roots and meanings but is not promoted as a religion in many areas.

If I were to bow to an idol, regardless of the logic I use to excuse it, I'm still violating my pledge to my God. Similarly, if I bow to a flag or room, regardless of the logic I use to excuse it, because of the roots from which the practice stems and is still practiced by world wide, I'm still violating my pledge to my God. Any other person who chooses to follow my God and also chooses to engage in martial arts has to work that issue out between himself/herself and God. I've already seen the answer clearly. I also have to accept that virtually all Dojos will discrimiate against me under the excuse of "discipline" . If it were simply discipline there are many alternatives that could be practiced that wouldn't violate the religious principles of the student while still allowing the student to display proper respect for the art, sensei, and fellow students.

Edit:
PS I don't shake hands with a room when I enter it. Neither do I worship nor hold sacred the religious symbols within my religion like others who claim to follow my faith.