The immune system can also cause hair loss. The immune system helps defend the body from viruses, bacteria and foreign substances. Sometimes the immune system mistakes hair follicles for a foreign substance and attacks them.