I don't think the craving due to deficiency is an urban myth - I think it's like finding that rehydration mix tastes OK if you're actually dehydrated, and absolutely foul the rest of the time...
Although I think there may also be a psychological factor as well - craving something we associate with comfort even though the actual foodstuff is no longer to our taste.
I have an occasional yearning for Mr Kipling Fench Fancies - they are little iced cakes
They really are not very nice - the icing is sickly sweet, the cake part is over-sweet and a bit dry, and the 'cream' topping has a faint chemical after-taste.
But from time to time I really want them, and will buy a box.
I am pretty sure that this is purely a comfort thing - my Grandma used to buy them for my granddad, so I associate them with visiting my grandparents.