M5 could of course have lied for tactical purposes. Perhaps Starfleet regulations called for it to rescue the crew of even an obviously extremely hostile enemy vessel such as the Excalibur
. But, being a typically cunning starship captain, M5 found a way to bend the rules, avoid placing its own ship in a tactically disadvantageous situation on humanoidtarian grounds, and still come off smelling of roses in its post-action report. It could just have noted that an evacuation was in process and lifepods were escaping into the "shadow cone" of the cripplied ship to avoid the wrath of the Enterprise
, and formulated that as "no life aboard", then de-tuned the sensors so that Sulu could not argue.
But even I have to make a trip to the kitchen for sodium chloride after such a convoluted rationalization. M5 didn't generally appear to be ashamed of its actions, or secretive, or concerned that the evidence blatantly ran contrary to M5 following Starfleet rules and guidelines.
(That is, contrary even if we assume all the ships attacked by M5 were considered legitimate enemies. I doubt Kirk would so callously destroy Klingon transports even in a declared commerce war, without more carefully making sure these really had no life aboard.)