I only know what happened to me when I ate a shit ton of junk food. I gained a couple lbs (went from 95 lbs to about 105), which was the desired result, but along the way developed IBS, among other health issues, and generally felt terrible.
Now I’m up to 105-108 lbs again but did it eating ‘healthy’ to an anal extent (which for me includes cutting out my IBS triggers). I feel great and look a lot better than when I was under 100 lbs.
Your doctor was wrong BTW. Those of us who are underweight by BMI (most especially men) have a higher risk of premature all-cause death than any weight class under obesity. I am not the biggest fan of BMI as a measure of health but I respect this statistic. I’ve known enough people who have landed in the hospital for this reason or that, and lost 20 lbs; I do not know if I would survive or be able to recover from going down to 85 lbs.