There are many reasons but one is,
Being too fat is a problem because if you eat too much, certain types of fat can cause a diet rich in saturated fat which can make cholesterol levels in blood. That can increase risk for heart disease.
Having too little fat is a problem because you could have mood problems, heart problems, Excessive appetite and eating too many vitamins causing more health problems