Multi-term mayors of New York who get national profiles always consider themselves Presidential material I assume because of the distortion effect on their mayoralty within the national press (a common non-political example of this is how often storms that might get a minute on your local news become national news with around the clock coverage if they're in NYC), along with the fact that they travel and order around the "greatest city in the world" like a king.
Rudy probably would have wanted to have run for President without even 9/11 had he pulled off that Senate nomination and probably even if he hadn't. (And if he had beaten Hillary, well, he probably would have become Bush's post-9/11 designated successor.) The only reason La Guardia didn't run for President is because of FDR, he would have ran in 1940 but early learned about FDR's "secret" campaign that everyone else also knew about eventually. Wagner, Lindsay, Koch, and Bloomberg all toyed with it while they were mayor. de Blasio was reported to have been doing his own private polling on it before his popularity tanked in NYC itself.
Wagner's failed bid for Senate was intended as the first step to a 1960 Presidential campaign. Lindsay swapped parties to run for the 1972 Democratic nomination since Nixon was incumbent and he needed to use his perceived national popularity asap.
Ed Koch never said exactly what the polls he got back said, but he (along with supporting Reagan) said
The People's Court was a much more realistic promotion for him.
When Mario Cuomo ran for Governor instead of Mayor, the "wisdom" was that he was killing his Presidential chances. In many respects, the Mayorality has been treated post-war as far more of a prominent platform for a future presidential contender and the Governorship where you go to become a nobody. Which has never really made sense considering how many Governors have both become prominent nationally, become the nominee and even become the President. Whereas Rudy is actually the most successful presidential candidate to come out of the Mayor's Office. Since the first World War alone, the Governor's office has offered up Al Smith, FDR, Thomas Dewey, Averell Harriman, Nelson Rockefeller, Hugh Carey*, Pataki** and both Cuomos. And many of those dudes for many terms, like Rockefeller was Governor for Life and built that Fascist Scar across Albany.
*The conventional wisdom of the time was that Carey was a strong Democratic candidate in either 1976 or 1980, but his wife died and he essentially decided to retire from politics instead after his re-election.
**Okay, bad example. Especially since he's been pro-choice always. He probably should have ran in 2012 rather than waiting until ten years after he left office. (He had signed a truce with Rudy in 2008 that only one New Yorker would run and that Rudy was the obvious one. Why, I have no idea, it must be a New York thing. He apparently didn't run in 2012 because his polling was bad against Romney in all the primary states, which doesn't explain why he ran in 2016 considering it was probably even worse against that field. Maybe he assumed there was a big pro-abortion and pro-immigration GOP vote waiting for him in Iowa.)