All pets do this for whatever reason occasionally - It probably shares AI behavior with monsters in terms of coding somewhere that bugs them out.