A federal judge in Texas on Friday said American Airlines AAL.O violated federal law by basing investment decisions for its employee retirement plan on environmental, social and other non-financial factors.