A comment actually about learning the language: I believe this sentence could also be translated as "They do not have father" (as might be heard in a film about a kidnap, for example). Also, it would be very useful if Duolingo added grammatical info to the solutions, e.g. here них is genitive of 'they', (as required when using "У... " for possession. And 'папы' is genitive singular of 'папа', because it's describing the absence of a father. Also 'папа' is a more informal word, so may be better translated as 'dad'. 'Отец' is more formal, so seems to correspond better to 'father'.
Because it’s in the genitive case. Duolingo does a bad job at explaining cases, so I’d recommend watching this video: https://www.youtube.com/watch?v=eHAIqnLPtmk&app=desktop