This may make it clearer. This variable contains the name of another variable. To get its value the shell must first expand the variable name and then the variable value.
for anime in $(eval echo \${$VALID_CATAGORY_ANIMAL[@]}); do
eval - It take an arguments expands variables and passes to execute by the shell
Since we escaped the first dollar sign, the command will go to execution in this:
$(echo ${VALID_ACQUATIC_ANIMAL[@]}
You can insert the following line before the loop
echo $VALID_CATAGORY_ANIMAL #VALID_ACQUATIC_ANIMAL
echo \${$VALID_CATAGORY_ANIMAL[@]} #${VALID_ACQUATIC_ANIMAL[@]}
eval echo \${$VALID_CATAGORY_ANIMAL[@]} #shark, dolphin