https://www.bls.gov/cpi/questions-and-answers.htm#Question_1...
You're confusing core CPI, which excludes them so analysts can see the difference, and the CPI values as reported generally in the media, which do include housing, food, and energy.
The most reported CPI is CPI-U (and is called CPI in the press), which is the CPI for urban consumers, which includes housing, food, and energy, and most comparable to historical and inflation values from other countries.
But BLS tracks many forms. If you want to learn about this read https://www.bls.gov/cpi/
What we really mean is that Fed policy is dictated by the Core PCE rate, which specifically excludes food and energy prices. So sure, the PCE and CPI measures energy and food prices and other volatiles prices, but *FED POLICY is dictated by the CORE rates*, which specifically exclude those volatile components.
So de facto, no one (ie. the Fed) doesn't care about energy or food price inflation.