Yes, people can think that if you aren't paid for programming, you aren't:
1. Doing your best work
2. Learning from others
3. Working hard enough to get a "real job"
4. Good enough to get a "real job"
There may be some truth to it, since getting paid means you likely have deadlines, co-workers to help you get unstuck, are working 8 hours a day at it, and you've passed someone else's idea of "good enough" in order to get hired somewhere. Unfortunately, this all can apply even if you're working as a programmer and doing this on your own time.
Sometimes doing after-hours programming will be held against you, as "obviously you aren't working hard enough during the day so that you still have energy to work more at night."
However, there are some (few) good reasons for these perceptions.
There's a lot of posers, or just plain noobs, that think they are the worlds greatest programmers, even though they definitely aren't. They think that all the time they've put into learning something immediately qualifies them for a Senior role, even if they've never worked as a dev before. Ok, so most of us have been there, but there are people who go into an interview thinking this and try to convince the hiring manager. And they get a job, try to tell the actual Seniors how to do the job, and generally make life hell until they can be strapped to their seat and shown just how bad their code is.
Not every noob is like that, but there's enough to keep people wary.
Having examples of your work to go along with the time you mention would be a good way to go, as James Khoury mentioned in the comments above. Having a code repo that you worked on, your own code repo (GitHub, BitBucket, whatever), or even a website of your own that can show the source code you produce. As many people say about a lot of things, "Show, don't tell." This is why artists have portfolios and musicians make CDs.
You can tell someone you climbed Mt. Everest, but if you don't have selfies at the top, it doesn't count, basically. Prove your worth.
I've been programming professionally for 6 years, but started programming on my own over 25 years ago. I've done a wide variety of projects for myself and for various positions I've held over the years. Do I want people to see my code from more than a few years ago? Probably not. I've learned 2 metric tons since I started doing it professionally and even looking at my own old code, I cringe.
Also, if you haven't been a professional for a while, your personal programming isn't likely going to be up to many coding standards. This isn't necessarily a bad thing for a Junior position, but it can be for someone looking for a Senior position. Really, I should rewrite most of my projects to make them look better on my own portfolio. I've done some of that, but not much. I've also posted the old code to a code repo, then pushed the changes to show not only my new level of skill, but also how much I learned since doing the project originally.
And yes, Dan Neely is correct. The interviewer was an idiot to put too much stock into it being "amateur" work, instead of looking at it and then deciding the quality of the code. There's a lot of people like that. Realize that if you don't get those jobs, it's probably a good thing, for your sanity.