Bows are not only offered as a greeting in Japan. Other times when it is appropriate to bow in Japan include:
Showing respect
Showing deep gratitude
Saying goodbye
Offering an apology
Telling someone congratulations
Expressing sympathy
When asking for a favor
To show appreciation
Many Japanese will avoid an awkward situation by offering to shake hands with Westerners instead. In formal settings and business engagements, sometimes a combination of handshakes and bows will ensue -- but never at the same time.