Booker was mayor of Newark for eight years. The Senate seat he won became available when Lautenberg died. Sure, Lautenberg was old but before Menendez's probable corruption surfaced, I don't know that Senate was the obvious path for him given those two were immovables.
Despite the possibility of a Dem senator staying in power in NJ long-term, there has been a lot of churn. Torricelli a was a rising DEM star, and big fundraising champ, then got caught in a money scandal. Retired Lautenberg was a very last-minute replacement when Torch pulled out real late during his 2002 re-election run. Corzine looked to have the personal finances to stick as long as he wanted, became bored as a US Senator (1 of 100) and unusually resigned to run for and become Gov of NJ.
As I recall, Booker was itching to jump in to Lautenberg's 2008 Senate reelection race and nearly did, but had only been Mayor of Newark for 2 years at that time. And then when Obama romped to Free World Leader, the Booker people kind of kicked themselves for not jumping in early (as Obama had done).
Booker is/was ambitious, yes. He never planned on his political career ending in Newark. Given his friendship with Christie, I bet Governor was the plan if there was one.
Having missed/skipped the early chance in 2008, Booker gained experience and publicity as Newark mayor. There was some talk/thought of challenging Christie for the governorship, instead of waiting for Old Lautenberg's 6 year term to expire. But the NJ Guvship is often a morass. It's one of the more powerful Guv offices in the Union, but the Dem controlled state congress often fights among itself, and there are multiple layers of corruption to navigate. Usually GOPers like Christie (and Christie Whitman) get elected Gov after Dem Govs go down in corruption flames**. Besides Booker didn't want to risk losing to Christie which would be a significant set-back.
Booker didn't want to upset NJ Dems by running against Menendez in 2012, and would have to just wait 2 years for 88 year old Lautenberg's term to be up. So Book waited his turn and was rewarded.
Simply Booker was always looking at the NJ Senate seat. The 2008 timing seemed too soon, and then they kicked themselves for not catching the Obama wave. Then Book bided his time as Mayor, gave some thought to a Guv race, and went after the first open Senate race when Lautenberg dropped dead. But that special election was only a year before Lautenberg's full term was up, and he wasn't running again.
One fact of NJ politics is that it is a very expensive state to run in. Partly because NJ is expensive for everything (with probably built-in mob and/or union costs), but mostly due to the need for TV buys in two expensive media markets in NYC & Philly. This means that you either need a self-funding rich guy (Corzine) or firm support from the party and traditional donors. So the Dem party has a good deal of control over who runs and when. (The GOP hasn't won a Senate seat in NJ since the The Nixon Era, when Clifford Case won his 4th term in 1972).
** when the Gov. McGreevey scandals went down, most news articles would refer to NJ as some version of "the most corrupt state in the nation, except for Louisiana." Though Illinois had an impressive string of Governors going to the slammer, I think the best they could do was perhaps 3rd.
Menendez was indicted in an illegal campaign scandal involving a Florida dentist and underage prostitutes in Dominican Rep, but was acquitted and brazened things out, winning reelection while under indictment in 2018.