The animation work is outsourced to countries like China, South Korea, and India. Those countries have much lower labor costs, so Japanese animation studios don't have to pay as much for their work. After all, full-time employees can be pretty expensive for companies to invest in (paid leave, 401K, etc).