Welcome to forums, a special thanks to you for using code tags for commands/codes/Inputs you had used in your post. Could you please try following and let me know if this helps you.
awk 'FNR==NR{A[$1]+=$5;B[$1]++;next} {A[$1]+=$5;B[$1]++} END{for(i in A){print i OFS A/B}}' File1 File2
Output will be as follows.
cat 17.9
dog 51.8333
rat 31.7333
fish 62.8
goat 9.5
Saying "the output is wrong" doesn't help us much. What, in the output you are getting, is wrong? With your sample input, what output are you trying to get? The output you said you want does not show the sum of values for each animal nor the average value for each animal (except for animals that only appear in one of your input files). Are you trying to prints animal sums in the output, or animal averages?
What values are you trying to average in your final line of output? Are you trying to calculate the average of all of the input values (which seems to be what your code is doing)? Are you trying to calculate the average of the averages for each animal? Are you trying to calculate the average of the sums for each animal?