Hello,
I'm a Japanese, was born and raised in Japan.
Although my English is not perfect, but I'll try to explain:)
When I was a child, my parents and teachers told me to say "いただきます" and "ごちそうさまでした" at meal time. And so, I did.
But now, I say it in a while. I think they're a little bit polite phrases.
But I surely say it when someone buy me lunch or dinner. To show a feeling of thankfulness. And as a matter of courtesy. And after the meal, I also say "ごちそうさまでした" them when I give a thank-you call or send a thank-you e-mail.