The aim is to find a technical/academic jargon (likely multiple syllables) to describe the act of following the law to a fault. Even the phrase "to a fault" doesn't quite get at the valance I'm after, it's more about applying the law where it may technically be applicable but fails to account for crucial context. The idiom: "Aside from your husband, what did you think about the play, Mrs. Lincoln?" comes to mind.
Consider the sentence:
As the theater burned, the gentleman threw a bouquet of flowers onto the stage for the actors. The gentleman is said to exhibit ________ behavior.
I initially considered "irrational" or "abnormal" here, but his actions would be rational and normal in any other setting. So these two choices don't capture the emphasis I'm looking for.