How can I get anemia even if I am eating healthy?

Keep tank filled. Glad you're eating healthy. Getting enough protein [lean meat, nuts and beans] and other iron-rich foods like dark green leafy vegetables? You can still get anemia if you lose or use up red blood cells faster than you make them. Common causes: stomach/digestion bleeding, heavy periods, chronic disease. Talk with your doc re: why your tank's too low and what's making it leaky.
Many ways. Eating healthy just means you are getting enough iron, b12, folate but you can loss blood [stool, urine, vaginal] or too little production due to many different disease or excess destruction- hemolysis- due to many diseases.