Europe would greatly benefit from
For Polish or Polish-owned industries, the key issue is whether or not Poland benefits from that economic activity as owners rather than clients or employees.
I just wonder if focusing on other areas would not have been smarter and more lucrative
I'd guess they're looking at that too, however we're very much at a time of technical flux and as far as industry in Europe is concerned, it's sort of make or break right now. Your country and my country of origin are mature economies and major industrial producers. Poland less so. Plus of course most key industries in Germany and the U.K. are owned domestically. Poland is a little far from that at the moment.
Why is it inherently moral to spend on defence spending, if the military ends up not being used?
Jobs and of course a deterrent. Plus of course the lucrative nature of arms exports and the concomitant development of peacetime technology and science that comes from funding arms research. Rolls Royce and BAe(the iteration of RR that still belongs to the U.K.) are the world's leading industrial powers for certain key technologies and those peacetime applications came via defence R&D. A big earner and provides thousands of jobs.
Poland is uniquely vulnerable due to centuries of other countries treating them as a back yard, most chillingly now seen in political rhetoric coming out of r*SSia.
After the war is over too, the reconstruction in Ukraine will be huge and Polish owned (and U.K./US) companies best placed to get the lead contracts for this.