Let me begin by saying that I'm living, breathing proof that my industry employs people in astronomy and astrophysics. Because astronomy is concerned with imaging celestial objects, I was uniquely qualified for a job with Veridian-ERIM International (V-EI). V-EI concentrates on creating imagery products of many types, so the techniques I learned for processing astronomical imagery are very relevant. In addition, I frequently make use of the physics of optics as it pertains to the study of astronomy such as interferometry and Fourier optics.
Having both a physics and astronomical background has been very valuable to me in my job in other ways, too. A large part of my Master of Science in astronomy involved learning to build and code models of physical processes. This has helped me in two ways:
First, it taught me the basics of several programming languages, and how to apply them in a practical way. Second, I learned how to describe the world around me in mathematical terms. Both of these abilities are highly marketable technical skills that could easily keep me employed in industry for many years to come.
I work on a landmine detection program and there are other folks here who keep track of how much forest has been clear-cut in the mountains out West. Besides environmental and humanitarian efforts, we also recently helped convict a murderer using the surveillance video from a gas station that was robbed. Yes, we do work on many government projects, but not all of them fall into the category of defense. And don't forget that there will probably always be a need for programmers as long as we live!