A man with no body fat is at high risk of death during a severe infection. Women might instinctively pick up on that. A dead man can’t provide or protect.
The overweight but otherwise healthy individual will last longer in crisis situations. I'm about 60 lbs. overweight, which translates to around 3 months of caloric reserves (likely an unhealthy amount TBH).
Before industrialization, being overweight was seen as a mark of beauty and wealth regardless of gender.
(Not a rationalization for being unfit or unhealthy when taken to extremes.)