Why is red bone marrow considered part of the immune system?

Blood cells are formed in Bone marrow including WBCs

in early life Lymphocytes are formed in bone marrow then migrate to lymphnode or thymus .. Red bone marrow continues production of white blood cells as neutrophils , basophils , esinophils