Companies that once touted the green benefits of their work are pivoting to defense and AI.