It wasn't just to challenge him, it was to avoid injury to female boxers. In fact further injury.
Olympic boxing trainer Rafa Lozano has said this about a training camp:
"We put [Khelif] with Jennifer Fernandez and it hurt her. Whoever we put [Khelif] with was injured.”
Lozano said that to avoid further injury to the women, the coaches eventually paired Khelif with Jose Quiles, one of Spain’s top male boxers."