My doctor gave me
A cursory explanation so I can’t vouch for my limited understanding.
That said, cholesterol is essential for the production of bile which breaks down foods. Late night foods probably equates to excess cholesterol released to break down said foods and higher cholesterol levels.
We probably want to have periods of fasting in order to not produce excess cholesterol.