The Australian Communications and Media Authority has launched legal action against Optus for allegedly failing to protect its customers' data before it was hit with a cyber attack in 2022.