Grieving for a pet is totally a thing.
Comparing its importance to that of a child might be taking it a little far. Nothing would compare to losing a child.
Losing a child must, by force of nature, be much more difficult to handle than even a 20+ year relationship with one's dearest horse or Galapagos turtle or tiger cub or something.
It is interesting to think about, in any case.