Yoga appeared 5000 years ago. It has the specificity and the advantage that while it is a body exercise system includes both a philosophy and an attitude such that requires the practitioner and spiritual work together with the physical.
Through the centuries many yoga schools were created in the world with some differences between them. Some minorities have linked yoga to Buddhism and that is why yoga is considered wrong by some as a religion.
The truth is that in the past yoga was used to prepare body and mind to accept religion, but yoga never though has been a religion system. If you want to liken philosophy and way of life that teaches yoga with something else, this is the philosophy of ancient Greek which has much in common.
Let us only remember the saying of the ancient Greeks' "healthy mind in a healthy body".
Yoga as a philosophy entitles each person to think where he wants, because the love in this philosophy has no name and is not subject to restrictions.