I would say to a degree that it does. While some aspects of comfort food might not contribute to optimal health, there is a lot more to good health than eating, exclusively, fruits, vegetables and whole grains. Attitude and emotional health are just as important to a robust immune system as nutrients in food.
Take it from someone who almost died from cancer and had to walk away from conventional medicine and turn to an alternative to survive (11 years now). While nutrition was a large part of my recovery (seemingly contradicting what I have said above LOL), inner healing and learning to deal with disappointment and unforgiveness toward others was also paramount.
I don't think you want to live on comfort food, but occasionally it is fine.
Of course, a qualifier to all this is what you are categorizing as comfort food. IMO, and through my experience with cancer and nutrition, I would say that sugar and white flour are very harmful to good health, but animal fat and meat are fine taken in moderation.
I wrote a book about my experience with cancer and everything I learned about nutrition. If you are interested in finding out more, visit my profile.