I can answer for my exh.
He was diagnosed with T2D about 10 years ago. His weight has yo-yo'd since as he's fluctuated between trying to lose the weight and reverse the T2D and not seeing why he should.
Our children are adults now so don't visit as often and are also in control of what they eat but, when they were younger, his diagnosis had the opposite effect to you'd expect.
He was, understandably, very upset at his diagnosis and spoke to me at length about it at the time (we'd split up by then).
He was very focused on sugar being a poison - "I've been literally poisoning my body!" "I'm not eating that shit anymore. I'm not being complicit in poisoning myself!"
But he still wanted to buy the crap he used to eat and so would buy it for the childen instead.
They only saw him EOW so they mostly ate with me but every time they came home from his, there were tales of absolutely appalling food they'd eaten and every time they came home with large tubs of Haribos or this Millions sweets. Everytime. I had to throw them out because my cupboards ended up looking lime the PTA cupboard the morning of a school disco!
Anyway, I did speak with him about it.
He explained that he was really resentful that he could no longer eat sugar or the sorts of food that he'd eaten before that contributed to his weight gain and T2D and that it made him happy to see his children enjoying it instead! In short, he was resentful that he could no longer 'treat' himself or have 'nice things' and so ate vicariously through them.
I pointed out to him that he was giving them the exact foods that had caused his illness and that, if he considered sugar to be a poison, then he was effectively choosing to poison them and encourage similar eating patterns in them that he was now rejecting; that he was setting them up for the same health problems. He disagreed and said he just wanted his kids to know he loved them.
He did take it on board a little but it only had a limited impact on how he chose to feed them. He equated really unhealthy foodstuffs with love.
I can't speak for anyone else though.