Normally, bile should go down your intestines ... but sometimes, when intestines are blocked, or simply intestines do not want anything going down due to sickness, in that case bile goes up into the stomach, makes you feel very bad in your stomach, and you vomit.
Next time you are fasting, try clean water enema, it may save you from some pain and suffering.