The comma before the coordinating conjunction or
These registered as messages of disdain, or as territorial marking.
is a prosodic comma, not a grammatical one, that is, one dictated by a pattern of speech imitated in print rather than rules of grammar, which this usage superficially violates. Commas come before coordinating conjunctions only when they introduce an independent clause or optionally — the so-called Oxford comma — the last element in a series.
I finally just sat, at which time he realized that he had not even offered me a seat. “Excuse me, monsieur, I didn’t even offer you a seat or something to drink or eat. Would you like some coffee or tea or perhaps something stronger?” He hardly paused for a breath. — Max Ciampoli, Linda Ciampoli, Churchill's Secret Agent: A Novel Based on a True Story, 2010.
But what if the man offering refreshment did take a breath? Then it would look something like this:
“What do you say to a cup of tea, or perhaps something stronger after your run, eh? and then a wash, and tea when you come down,” Markham acknowledged that at the moment the “something stronger” certainly seemed to meet the situation. — Montague Summers, The Grimoire and Other Supernatural Stories, 1936, 288.
Perhaps the person speaking to Markham only thought of offering him an alcoholic beverage after having said “cup of tea,” or wished to elevate its topicality by a pause. Given Markham’s reaction, it’s probably the latter. The comma in and then a wash, and tea when you come down is also prosodic, not grammatical.
Though joined by a coordinating conjunction, messages of disdain and — since the author is talking about human behavior — territorial marking are not of equal topicality, so the comma introduces a slight pause to accent the unexpectedness of the second element. Other punctuation choices:
These registered as messages of disdain — or as territorial marking.
These registered as messages of disdain (or as territorial marking).
would draw more attention to the notion of Mallory marking his territory like a tomcat than the author wishes.
Though technically incorrect, one finds such commas fairly often with compound predicates:
Once the tent was set up I took a hike with Sophie along a trail bordering the lake, and then decided to take a shortcut across country in the direction of the tent. — David Laursen, Going to (And With) the Dogs, 2008.
Here, the comma accents the difference in time between taking a hike and then deciding on another route back.
Similar concerns dictate comma placement in this sentence:
He took a bite of his bread and drank some of his water, and then decided he would sleep for a few minutes. — Adam Pfeffer, To Change the World and Other Stories, 2008, 54.
Both writers imitate a pause one would introduce when telling the story aloud. Repeating the subject pronoun merely to make the comma grammatical seems overly fastidious. I didn’t realize it until now, but I did the same prosodic comma trick above in the sentence:
Perhaps the person speaking to Markham only thought of offering him an alcoholic beverage after having said “cup of tea,” or wished to elevate its topicality by a pause.
I would hesitate calling the subject of the verb wished an elided he to justify the comma, as it is a claim one could equally make for
He took a bite of his bread and [he] drank some of his water.
where no careful writer would insert a comma.
Your first example, however,
As if impatient for advancement, Mallory often used his boss’s office late at night, and worked on her computer.
I would consider a comma error because using the boss’s office and working on her computer are simultaneous actions of equal topicality. There would be no pause in speech while narrating these actions, so a prosodic comma would be unwarranted.
I would also say working at her computer, since working on her computer might suggest he was repairing it.