The Washington Post published a detailed story about the timeline leading up to the Breyer nomination.
Someone, somewhere, somehow, informed the White House in the fall that Breyer planned to retire in early 2022:
Inside the White House, senior officials had known for months that Breyer's retirement was almost imminent, long before he officially announced his decision in a letter to Biden last Thursday, according to two people with knowledge of the matter.
Late last fall, senior White House aides were informed Breyer was close to a decision, and they had expected him to make the announcement he would retire in early 2022, according to the people, who spoke on the condition of anonymity to disclose private conversations.