In general, the people you select to be your references should be those people who are best equipped to talk about you and your work, work ethic, personality, competencies, and other qualities that match the position or position types you are targeting in your job search.
As a hiring manager, I don't care where those references come from; in the specific situation described, of using a professor to be your reference for a position outside of academia, it wouldn't make a difference to me as long as the reference is valuable for the reasons I described above.
Plenty of hard working, smart, personable, competent people were great research assistants or teaching assistants for professors and can use that experience in industry an thus the reference is "valid". Similarly, even if you did not work for a professor but he was your major advisor or someone with whom you had several classes and he can honestly speak to the qualities I'm looking for in a professional reference, then that's great!
Here's when the "using a professor as a reference" goes awry -- and this is both for jobs inside academia and in industry as well: if the professor doesn't remember you and can't speak to your skills and expertise and other personal attributes, if you are only using the professor's as a reference to get a foot in the door and have nothing of your own to back up that reference, or if you are still using professors as references after your second, third, or fourth (or more!) job. By that time you should be considering using actual industry references, otherwise a hiring manager is going to wonder what is wrong with your or what went wrong in all of your jobs since school.
As always, different hiring managers are going to have different interpretations of the types of references they value and do not value. As long as you have put some thought into the reference request and your referee can provide a thoughtful and personal reference for and about you, you've covered all the bases.