Animals were an extremely large part of ancient Egyptian life and were treated with the same respect as a Pharaoh since some were though of as incarnations of gods. This is emphasised in a true account told by a Greek historian named Diodorus Siculus. He told the story that while on a visit to Egypt he had witnessed the killing of a Roman soldier that had accidentally killed a cat.
Another reason the Egyptians highly regarded animals was because they were highly sought after food. One strange fact was that some animals were mummified to give mummified people food in the afterlife.
Rich families that could afford to mummify their pets when they died of natural causes would do so to make sure they lived on in afterlife and be their to greet them when their owner died. But some animals were not quite so lucky as others. Sometimes when the owner of the pet died they would kill and mummify the pets to keep them company.
Animals were also used as sacrifises to gods. Evidence of ritual animal sacrifice was found in 1888 when an Egyptian farmer, digging on his land, found a mass grave of mummified felines. The cats were thought to be a sacrifice to one of the many Egyptian gods.
Overall animals were very important in Ancient Egyptian life and agriculture so they were treated very well because of this. If an animal with any sort of spiritual attachment died they would be mummified and they would have a ellaborate funeral processesion just like the Pharaohs would.