Of course the feed store told you that. They sell more feed that way.
Cynacism aside, the food you buy is balanced nutrition for the utmost in egg-laying. It is the most efficient in providing everything they need. If you feed them other things or let them free-range, they don't get a perfect balance. Is this bad? Well, I don't get a perfect balance either. Some days I am a little light on fruit or I may be heavy on starch if I eat pasta. It obviously has not stunted my growth and I should have stopped growing over 40 years ago. Key words, "should have".
The perfect balance from the grower will give you the same pale bland eggs that you can buy from the store. If you supplement their diet with greens, bugs, whatever, you get more flavor and color. There was an article in Mother Earth
http://www.motherearthnews.com/Relish/F
-Eggs.aspx
about the nutritional value of free-range eggs, byut some people have questioned the science behind this article. I'll not get any deeper into that.
Bottom line, in my opinion, if you feed them enough other stuff to get their diet way out of whack, you might effect egglaying. But if you don't go overboard, you are reducing your feed bill and adding flavor to your eggs.