Markets are agnostic to problems solved
Markets are agnostic to what kind of problem they solve and for whom.
Whether a market produces more solutions for human medical challenges or more solutions for human warfare---or whether it invents problems like bad breath for which more solutions are needed---is wholly a consequence of the construction of that market, and that construction will always be human made, either by accident or by design. Markets are meant to be servant, not masters.