Imagine this is a title of a magazine story:
Why did doctors tell us not to eat fast food?
Then we ideally put a question mark because this is clearly a question.
But what about this:
Why Doctors told not to eat fast food
Do we put a question mark after that or not?
It starts with "why", but the meaning is not a question, it is rather affirmative. It's like saying:
This is why doctors told us not to eat fast food.
So, do we put a question mark or not?