Ms. Harris was one of four finalists for the job, along with Senator Elizabeth Warren of Massachusetts, Gov. Gretchen Whitmer of Michigan and Susan E. Rice, the former national security adviser. But in the eyes of Mr. Biden and his advisers, Ms. Harris alone covered every one of their essential political needs…

Other candidates rose and faded in the process: Senator Tammy Duckworth of Illinois powerfully impressed Mr. Biden’s search team, but his lawyers feared she would face challenges to her eligibility because she was born overseas. Representative Karen Bass of California emerged as a favorite among elected officials and progressives — Speaker Nancy Pelosi spoke glowingly of her to Mr. Biden — but the relationship-focused Mr. Biden barely knew her…

There was a particular distrust in the Biden camp for the sharp-elbowed California operatives with whom Ms. Harris has long surrounded herself, fearing that they might seek to undermine Mr. Biden in office to clear the way for Ms. Harris in 2024.

Yet no other candidate scored as highly with Mr. Biden’s selection committee on so many of their core criteria for choosing a running mate, including her ability to help Mr. Biden win in November, her strength as a debater, her qualifications for governing and the racial diversity she would bring to the ticket. No other candidate seemed to match the political moment better.