WASHINGTON — The revelation that James B. Comey documented his interactions with President Trump — describing in detail how the president urged him to quash the federal investigation into Michael T. Flynn, the former national security adviser — provided the clearest evidence yet that Mr. Trump tried to influence the government’s inquiry into possible links between his associates and Russia.

It also shined a bright light on something more commonplace: the F.B.I.’s practice of keeping careful, contemporaneous notes.

For law enforcement officials like Mr. Comey, who was fired last week as the director of the F.B.I., documenting sensitive conversations is a reflex — and in keeping with the habits of diligent lawyers. Mr. Comey was a federal prosecutor and corporate counsel before he ran the F.B.I.

In sensitive investigations as well as in routine matters, it is standard for people who work in law enforcement to keep detailed phone and meeting logs, Lauren C. Anderson, a former top F.B.I. official, said.

“That’s the culture of the F.B.I. — you habitually document everything you do,” Ms. Anderson, a 29-year veteran of the bureau, said. “As a rule, you’re not taping every conversation, so your ability to recall details in a way that can be maintained and relied on is absolutely critical.”

The instinct to preserve possible evidence goes beyond the F.B.I.

“The same is true in the C.I.A.,” Ms. Anderson said. “They’re meticulous in their documentation of both formal and informal communications.”

Memos such as Mr. Comey’s help reflect a level of detail documented while events were still fresh in the writer’s mind. In court, they can serve to corroborate testimony.

Interactions with people who may in some way figure into an investigation — regardless of what may be discussed — could be pertinent to an inquiry and serve as evidence later.

“Memos give you the flexibility to report facts as well as atmospheric impressions,” Ms. Anderson said.

“It goes to his credibility,” she said of Mr. Comey. “The fact that he wrote it when it happened lends weight to it. It’s not like he wrote something last weekend and backdated it.”

Mr. Comey’s memos were not the standard forms that F.B.I. agents use to summarize the facts of interviews they conduct, called FD-302s, or 302s in bureau parlance. They were a more informal way to document not just the facts of an interaction but also personal impressions and analysis to help contextualize those facts.

In 2007, the typewritten notes of Robert S. Mueller III, the F.B.I. director at that time, helped resolve a dispute over the Bush administration’s warrantless surveillance program.

Mr. Comey, as it happens, was also involved in that instance. He testified in 2007 before a congressional committee about a series of meetings and phone conversations about the surveillance program from 2004, when he was deputy attorney general.

Mr. Comey, who had opposed the surveillance program, had different recollections than senior White House officials did, and Mr. Mueller’s notes provided key corroboration of Mr. Comey’s version of events.

Mr. Comey had also documented concerns about the Bush administration’s use of brutal interrogation tactics in 2005 in emails, which were made public in part in The New York Times in 2009.