Carrots will allow me to see in the dark if I eat enough of them.
This was (and is) a very successful British WWII misinformation campaign. The Brits didn't want it known that their aircraft had radar - which allowed them to find enemy aircraft at night. So they embellished carrots' benefit on night vision to cover up their technological advantage.
It worked. Don't feel bad for believing it. Everyone believed it.