The reason the government should fund sex-segregated classes is to keep Orthodox Jewish students in state-run schools, the Education Ministry has told the High Court of Justice.